Skip to content

Instantly share code, notes, and snippets.

@alexzhan
Created July 31, 2013 08:06
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 alexzhan/6120208 to your computer and use it in GitHub Desktop.
Save alexzhan/6120208 to your computer and use it in GitHub Desktop.
<?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