On Tue, 04 Jan 2005 02:59:22 +0000, 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_PAAMAYIM_NEKUDOTAYIM" > > So ok, you can't put variables at the front on a class call like that. > Minor bug I'm thinking at this point, but I wonder if I can work round > it. So, onto step two: > $input = "foo"; > $scanning_class = "clamav"; > $func = $scanning_class."::scanBuffer"; > $result = $func($input); > Which fails with a "Fatal error: Call to undefined function > clamav::scanBuffer()" > > Just doing: > $result = clamav::scanBuffer($input); > of course works absolutly fine. > > Somebody just tell me that this isn't exactly expected behaviour and > it's a minor bug > > this is all on 5.0.3 btw.
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);"); Regards, Jason http://blog.casey-sweat.us/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php