Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3164 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74220 invoked from network); 2 Jul 2003 14:12:24 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.186) by pb1.pair.com with SMTP; 2 Jul 2003 14:12:24 -0000 Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19XiLP-00084L-00 for internals@lists.php.net; Wed, 02 Jul 2003 16:12:23 +0200 Received: from [217.80.180.194] (helo=[217.80.180.194]) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19XiLP-0008U5-00 for internals@lists.php.net; Wed, 02 Jul 2003 16:12:23 +0200 To: internals@lists.php.net In-Reply-To: <1057120491.17089.3.camel@hasele> References: <1057120491.17089.3.camel@hasele> Content-Type: text/plain Organization: Message-ID: <1057155106.32204.65.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 02 Jul 2003 16:11:47 +0200 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Nasty Parser Bug From: thekid@thekid.de (Timm Friebe) On Wed, 2003-07-02 at 06:34, Sterling Hughes wrote: [...] > $t = new test; > var_dump($t->filter('hello world')); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Changing this line to: var_dump(call_user_func(array($t, 'filter'), 'hello world')); or even $t= new Reflection_Method('test', 'filter'); var_dump($t->invoke(new test(), 'hello world')); yields the same bug. ZE1 outputs "int(1)". ZE2 does so, too, if I rename "test" to anything else (except "__construct", which causes the same problem). The same problem arises for other array functions such as usort, array_map etc., but _not_ for call_user_func(_array). After short investigation it looks like all of these use fast_call_user_function() but do not pass an object_pp. Either this should be patched in ext/standard/array.c or fast_call_user_function shoud check for the callback being an array($obj, $func) / array($class, $func) *even* when a function pointer is passed. - Timm