Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14271 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60973 invoked by uid 1010); 4 Jan 2005 04:34:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 60953 invoked from network); 4 Jan 2005 04:34:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2005 04:34:00 -0000 X-Host-Fingerprint: 64.165.117.58 adsl-64-165-117-58.dsl.snfc21.pacbell.net Linux 2.4/2.6 Received: from ([64.165.117.58:43228] helo=aludra.leftbrained.org) by pb1.pair.com (ecelerity HEAD (r3992M)) with SMTP id 2D/A4-27561-7BC1AD14 for ; Mon, 03 Jan 2005 23:34:00 -0500 Received: from [64.165.117.60] (mirzam.leftbrained.org [64.165.117.60]) by aludra.leftbrained.org (8.12.8/8.12.8) with ESMTP id j0454aRn020697 for ; Mon, 3 Jan 2005 21:04:36 -0800 Message-ID: <41DA1D06.8010803@leftbrained.org> Date: Mon, 03 Jan 2005 20:35:18 -0800 User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net References: <41DA068A.9080009@fission.org.uk> In-Reply-To: <41DA068A.9080009@fission.org.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] bit of an odd bug From: listschris@leftbrained.org (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 = "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. >