Re: T_PAAMAYIM_NEKUDOTAYIM
| From: | Andi Gutmans | Date: | Wed, 18 Dec 2002 05:17:10 +0000 |
| Subject: | Re: T_PAAMAYIM_NEKUDOTAYIM | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-92570@lists.php.net to get a copy of this message | ||
It won't be supported but you can use eval() if you really need to.
Andi
At 08:47 PM 12/16/2002 +0100, Bertrand Mansion wrote:
<derick@php.net> wrote : On Mon, 16 Dec 2002, Bertrand Mansion wrote:It's just not supported by PHP. Will it be supported ? This would allow<sterling@bumblebury.com> wrote :Its neither, its a fact of the language, the following: $classname::method is illegal, you recieved a parse error to that effect. the best thing to do is::I don't understand why it is illegal...insidecall_user_func(array($className, 'method'), $param1, $param2);This won't work because, in my case, I don't want to make an instance of $className but rather use $className methods as if they were pluggedThis doesn't make an instance at all. Sorry, I didn't choose the right way to explain. :) I meant that call_user_func needs an instanciated object which I can't provide as what I really want to do is use a method from a class, not from an instanciated object. (not sure it's clearer ?) And keep an access to $this from inside the object calling the external method because my parsing is actually recursive. For an example of my current code, you can have a look at Container.php in the Config package of PEAR (in CVS only). I am having hard time to figure out what would be the best way to implement this in PHP. Bertrand Mansion Mamasam -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.phpmy main object.