Skip to content

Instantly share code, notes, and snippets.

@hybridwebdev
Last active July 25, 2016 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hybridwebdev/17e43ba55fb4e5080268352b5e3aa9a8 to your computer and use it in GitHub Desktop.
Save hybridwebdev/17e43ba55fb4e5080268352b5e3aa9a8 to your computer and use it in GitHub Desktop.
class _Parent {
function __construct() {
parent::__construct();
$this->self_define();
}
function self_define() {
$this->foo = 'hello world';
}
}
class Child extends _Parent {
function __construct() {
parent::__construct();
}
function self_define () {
$this->foo = 'Goodbye';
}
}
$Child = new Child();
echo $Child->foo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment