It is very simple:
uh oh. :)
If this is defined in a static method it is a language error. However when mentioning this problem the acronym BC often gets used for what ever reason. I mean the idea of the new OO model was to have OO in php at least, wasn't it ?
i can't say. you want to be able to call parent::method() and have $this available there, for sure. it is not truly a static call, it is just syntax that looks like static, i think. (but for sure i don't know!) 'static' modifier to function def was added, if i read archive right, for the reason you say. (though 'static function bar()' has no $this whether called as class::bar(), $x->bar(), or $this->bar() - so not really about how it is called, more about what it is.)
If this isn't defined in a dynamic (non static) method that it is obviously an error that can't be discussed away. Not even with BC reasons.
this is why i ask. whether method is effectively dynamic or effectively static depends on circumstances. it is tricky, for me to understand at least. (not hard thing to accomplish...)
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php