Re: [PHP-DEV] bit of an odd bug

2005-01-04 Thread Jochem Maas
Wez Furlong wrote: If you want to do this kind of thing, why not do it properly? $foo = new $scanning_class; $foo->scanBuffer($input); that is, after all, what "extends" is all about. --Wez hihi, that why Wez get the 'King' prefix and everyone doesn't :-) ... -- PHP Internals - PHP Runtime Develo

Re: [PHP-DEV] bit of an odd bug

2005-01-04 Thread Wez Furlong
If you want to do this kind of thing, why not do it properly? $foo = new $scanning_class; $foo->scanBuffer($input); that is, after all, what "extends" is all about. --Wez On Tue, 04 Jan 2005 15:01:32 +, Gareth Ardron <[EMAIL PROTECTED]> wrote: > Jason Sweat wrote: > > >Hi Gareth, > > > >I

Re: [PHP-DEV] bit of an odd bug

2005-01-04 Thread Gareth Ardron
Jason Sweat wrote: Hi Gareth, In addition to the other options people have mentioned, you could also use the old standby of: eval("\$result = $scanning_class::scanBuffer(\$input);"); Cheers for all the replies, people. I may have a bit of a prod at the internals this evening though, as this is

Re: [PHP-DEV] bit of an odd bug

2005-01-04 Thread Jason Sweat
On Tue, 04 Jan 2005 02:59:22 +, Gareth Ardron <[EMAIL PROTECTED]> wrote: > Ok, I'm in need of a sanity check here. > > step one: > $input = "foo"; > $scanning_class = "clamav"; > $result = $scanning_class::scanBuffer($input); > now this fails with a "Parse error: parse error, unexpected > T_PA

Re: [PHP-DEV] bit of an odd bug

2005-01-03 Thread Chris
That, I'm afraid, is expected behavior, though I believe you can use: call_user_func(array($scanning_class,'scanBuffer')); http://www.php.net/call_user_func I *could* be wrong though Chris Gareth Ardron wrote: Ok, I'm in need of a sanity check here. step one: $input = "foo"; $scanning_class = "clam

Re: [PHP-DEV] bit of an odd bug

2005-01-03 Thread Adam Maccabee Trachtenberg
On Tue, 4 Jan 2005, Gareth Ardron wrote: > Somebody just tell me that this isn't exactly expected behaviour and > it's a minor bug This is a known limitation. I suggest using the reflection classes to work around this. class foo { static function bar() { print "static method!\n"; } } $c

Re: [PHP-DEV] bit of an odd bug

2005-01-03 Thread Nicolas Bérard Nault
Hi, This looks a lot more like a limitation of the Zend engine to me. The second observation you made is correct, at least, from my point of view. You are literally calling a function named clamav::scanBuffer(), not the member function of the class clamav. Hope this helps, Nicolas Bérard Nault.

[PHP-DEV] bit of an odd bug

2005-01-03 Thread Gareth Ardron
Ok, I'm in need of a sanity check here. step one: $input = "foo"; $scanning_class = "clamav"; $result = $scanning_class::scanBuffer($input); now this fails with a "Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM" So ok, you can't put variables at the front on a class call like that.