Lukas Smith wrote:
http://bugs.php.net/bug.php?id=30235
I agree with Marcus: self is bound at runtime, so the behaviour is correct. If you do not like this late binding just do not use self but the name of the class.
So please explain to me how you would write a singleton static method for a base class from which you can inherite. Suddenly the idea with using the class name becomes less useful.
The late binding seems to be a nice performance tweak, but it means that in many situations you end up having to do cut and paste in combination with inheritance. Doesnt seem very OOP to me, altough I fear Java behaves the same way. So all I am asking for is an easy way to call a static method in the current context (without having to go through the reflection API, having to store the class name in a static property etc).
regards, Lukas
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php