Re: calling static method dynamically
| From: | Greg Beaver | Date: | Wed, 03 Mar 2004 18:23:08 +0000 |
| Subject: | Re: calling static method dynamically | ||
| References: | 1 2 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-815@lists.php.net to get a copy of this message | ||
Hi,
The argument I've been having with Rob Richards (subject line "more static method fun") has been over the ability to call methods from other classes using the T_DOUBLE_COLON "::"
I think it should be allowed even if the method isn't static, and he doesn't, but none of the big guns have chimed in, so I doubt it will be changing.
In the global context, you can't call non-static methods using ::
Greg
Lukas Smith wrote:
Hundiak, Arthur wrote:I'd like to point out that in PHP5 static methods can only be called using the class syntax (CLASS:method() )and cannot be called using object syntax ($object->method). isset($this) no longer has any meaning. As Greg has suggested, all PEAR methods using isset($this) need to be split into two methods once PHP5 is deployed. May as well do it now. BTW, there is a long thread on this topic on the internals mailing list.Not having read that thread entirely I got the impression that things will not change actually. regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07