Created
September 5, 2013 13:54
-
-
Save Danack/6450389 to your computer and use it in GitHub Desktop.
For you php noob.
This file contains hidden or 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
absract class parent { | |
abstract function childMethod(); | |
function parentMethod(){ | |
$this->childMethod(); | |
} | |
} | |
class foo extends parent { | |
function childMethod(){ | |
return 'I am child'; | |
} | |
} | |
$o = new foo(); | |
echo $o->parentMethod()->childMethod(); |
Actually, I tried it now, it does not work at all. I even modified 'parent' changing it to non-reserved keywords and still gives an error.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
abstract *