In PHP, I\'m trying to reference a method defined in an object\'s parent class, from a method inherited from the object\'s parent class. Here\'s the code:
c
Im not quite sure I understands why you want to do like this. But I guess you cannot do it. I understand that you will be able to make a middle_class2 and be able inherit from that, and then it would be middle_class2 instead of middle_class's dosomething you call?!
So I guess you'll need to create the
function inherit_this() {
parent::do_something();
}
in the middle_class.
I thought about a get_class($this)::parent::do_something().. but that didn't work.
Just to be sure.. You want to call middle_class::do_something() right??