Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-17 Thread Andi Gutmans
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: <[EMAIL PROTECTED]> wrote : > On Mon, 16 Dec 2002, Bertrand Mansion wrote: > >> <[EMAIL PROTECTED]> wrote : >> >>> Its neither, its a fact of the language, the followin

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-17 Thread Markus Fischer
On Tue, Dec 17, 2002 at 09:57:08AM +0100, Bertrand Mansion wrote : > <[EMAIL PROTECTED]> wrote : > > > On Tue, 17 Dec 2002, Bertrand Mansion wrote: > > > >> If this behaviour could be extended to support $className::method(), that > >> would be just great. > > > > Search the archives, it was br

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-17 Thread Bertrand Mansion
<[EMAIL PROTECTED]> wrote : > On Tue, 17 Dec 2002, Bertrand Mansion wrote: > >> If this behaviour could be extended to support $className::method(), that >> would be just great. > > Search the archives, it was brought up before, conclusion: it will not > happen. I only found this: http://marc.t

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Derick Rethans
On Tue, 17 Dec 2002, Bertrand Mansion wrote: > If this behaviour could be extended to support $className::method(), that > would be just great. Search the archives, it was brought up before, conclusion: it will not happen. Derick -- ---

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Brad LaFountain
--- Bertrand Mansion <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote : > > > > > --- Bertrand Mansion <[EMAIL PROTECTED]> wrote: > >> <[EMAIL PROTECTED]> wrote?: > >> > >>> $classname::method() === call_user_func(array($classname,'method')); > >> > >> No. $classname::method() is illegal

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Bertrand Mansion
<[EMAIL PROTECTED]> wrote : > > --- Bertrand Mansion <[EMAIL PROTECTED]> wrote: >> <[EMAIL PROTECTED]> wrote?: >> >>> $classname::method() === call_user_func(array($classname,'method')); >> >> No. $classname::method() is illegal and is in no case === to >> call_user_func(array($classname,'metho

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Brad LaFountain
--- Bertrand Mansion <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote : > > I guess I am going to have to write stupid code such as: > > switch ($param1) { > case 'parser1': > return parser1::method(); > case 'parser2': > return pa

RE: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Mike Robinson
Just so you know, not so long ago a google search for "T_PAAMAYIM_NEKUDOTAYIM" used to turn up just 1 matching result. :P Regards Mike Robinson Pierre-Alain Joye wrote: > On Tue, 17 Dec 2002 00:17:47 +0100 > Pierre-Alain Joye <[EMAIL PROTECTED]> wrote: > > > On Mon, 16 Dec 2002 23:56:03 +0100

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Pierre-Alain Joye
On Tue, 17 Dec 2002 00:17:47 +0100 Pierre-Alain Joye <[EMAIL PROTECTED]> wrote: > On Mon, 16 Dec 2002 23:56:03 +0100 > Bertrand Mansion <[EMAIL PROTECTED]> wrote: > > > will return 'Undefined variable: this'... > > The syntax foo::bar() should be used for every method callable > directly(ex: a f

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Pierre-Alain Joye
On Mon, 16 Dec 2002 23:56:03 +0100 Bertrand Mansion <[EMAIL PROTECTED]> wrote: > will return 'Undefined variable: this'... The syntax foo::bar() should be used for every method callable directly (ex: a factory), without an instance of the parent object. The "$this" variable represents the object

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Bertrand Mansion
<[EMAIL PROTECTED]> wrote : > $obj = new MyObject('out of this'); > > will print 'from MyObject'. Read "will print 'out of this'". Thanks, Bertrand Mansion Mamasam -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Bertrand Mansion
<[EMAIL PROTECTED]> wrote : I guess I am going to have to write stupid code such as: switch ($param1) { case 'parser1': return parser1::method(); case 'parser2': return parser2::method(); } >>> >>> call_user_func(array($param1, 'met

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Sara Golemon
>>> I guess I am going to have to write stupid code such as: >>> >>> switch ($param1) { >>> case 'parser1': >>> return parser1::method(); >>> case 'parser2': >>> return parser2::method(); >>> } >> >> call_user_func(array($param1, 'method')); > > No. Undefined variable this i

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Bertrand Mansion
<[EMAIL PROTECTED]> wrote : > On Mon, 16 Dec 2002, Bertrand Mansion wrote: > >> I guess I am going to have to write stupid code such as: >> >> switch ($param1) { >> case 'parser1': >> return parser1::method(); >> case 'parser2': >> return parser2::method(); >> } > > call

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Derick Rethans
On Mon, 16 Dec 2002, Bertrand Mansion wrote: > I guess I am going to have to write stupid code such as: > > switch ($param1) { > case 'parser1': > return parser1::method(); > case 'parser2': > return parser2::method(); > } call_user_func(array($param1, 'method')); Derick

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Bertrand Mansion
<[EMAIL PROTECTED]> wrote : > On Mon, 16 Dec 2002, Bertrand Mansion wrote: > >> And keep an access to $this from inside the object calling the external >> method because my parsing is actually recursive. > > $this only works for instanciated classes, not static method calls. >From the documenta

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Pierre-Alain Joye
On Mon, 16 Dec 2002 20:55:49 +0100 (CET) Derick Rethans <[EMAIL PROTECTED]> wrote: > > And keep an access to $this from inside the object calling the > > external method because my parsing is actually recursive. > > $this only works for instanciated classes, not static method calls. Indeed, you

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Derick Rethans
On Mon, 16 Dec 2002, Bertrand Mansion wrote: > <[EMAIL PROTECTED]> wrote : > > > It's just not supported by PHP. > > Will it be supported ? Not anytime soon. > This would allow > >> > >>> call_user_func(array($className, 'method'), $param1, $param2); > >> > >> This won't work because, in my

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Bertrand Mansion
<[EMAIL PROTECTED]> wrote : > On Mon, 16 Dec 2002, Bertrand Mansion wrote: > >> <[EMAIL PROTECTED]> 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 do

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Derick Rethans
On Mon, 16 Dec 2002, Bertrand Mansion wrote: > <[EMAIL PROTECTED]> 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...

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Bertrand Mansion
<[EMAIL PROTECTED]> wrote : >> Hi, >> >> Tell me if this is the wrong list to ask or if this has been answered >> somewhere else before. Thanks :) >> >> I am trying to make something like that: >> >> $myClassName = 'MyClass'; >> return $myClassName::myMethod($param1, $param2); >> >> And I get

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Attila Strauss
Bertrand Mansion wrote: hi bertrand, php-general would be the right list. call_user_func_array(); http://www.php.net/call_user_func_array is what you are looking for. bye attila -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Sterling Hughes
> Hi, > > Tell me if this is the wrong list to ask or if this has been answered > somewhere else before. Thanks :) > > I am trying to make something like that: > > $myClassName = 'MyClass'; > return $myClassName::myMethod($param1, $param2); > > And I get : > > Parse error: parse error, unexpec

[PHP-DEV] T_PAAMAYIM_NEKUDOTAYIM

2002-12-16 Thread Bertrand Mansion
Hi, Tell me if this is the wrong list to ask or if this has been answered somewhere else before. Thanks :) I am trying to make something like that: $myClassName = 'MyClass'; return $myClassName::myMethod($param1, $param2); And I get : Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM