Re: bit of an odd bug
| From: | Nicolas Bérard Nault | Date: | Tue, 04 Jan 2005 03:09:03 +0000 |
| Subject: | Re: bit of an odd bug | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-14269@lists.php.net to get a copy of this message | ||
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.
On Tue, 04 Jan 2005 02:59:22 +0000, Gareth Ardron <gareth@fission.org.uk> 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.
>
> --
> Gareth Ardron
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>