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 = "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.
Cheers.
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
