Skip to content

Instantly share code, notes, and snippets.

@Danack
Created September 5, 2013 13:54
Show Gist options
  • Save Danack/6450389 to your computer and use it in GitHub Desktop.
Save Danack/6450389 to your computer and use it in GitHub Desktop.
For you php noob.
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();
@samayo
Copy link

samayo commented Sep 14, 2013

abstract *

@samayo
Copy link

samayo commented Sep 14, 2013

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