Last active
July 25, 2016 01:41
-
-
Save hybridwebdev/17e43ba55fb4e5080268352b5e3aa9a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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