Re: Re: new overloading feature?
| From: | Lukas Smith | Date: | Tue, 10 May 2005 12:57:56 +0000 |
| Subject: | Re: Re: new overloading feature? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-16195@lists.php.net to get a copy of this message | ||
Sebastian Bergmann wrote:
Lukas Smith wrote: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, Lukashttp://bugs.php.net/bug.php?id=30235I 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.