Created
July 31, 2013 08:06
-
-
Save alexzhan/6120209 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 Foo { | |
function myFoo() { | |
return $this->myBar(); | |
} | |
function myBar() { | |
return "Foo"; | |
} | |
} | |
class Bar extends Foo { | |
function myBar() { | |
return "Bar"; | |
} | |
} | |
$foo = new Foo; | |
echo($bar->myFoo()); //Bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment