Created
April 29, 2014 14:40
-
-
Save nicolashohm/11402394 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
<?php | |
class Base { | |
function __construct() { | |
$this->foo(); | |
} | |
private function foo() { | |
echo 'foo'; | |
} | |
} | |
class Sub extends Base { | |
private function foo() { | |
echo 'lel'; | |
} | |
public function test() { | |
$this->foo(); | |
} | |
} | |
$sub = new Sub; // foo | |
$sub->test(); // lel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment