Re: bit of an odd bug

From: Date: Tue, 04 Jan 2005 04:35:18 +0000
Subject: Re: bit of an odd bug
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-14271@lists.php.net to get a copy of this message
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.


« previous php.internals (#14271) next »