Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46466 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47407 invoked from network); 18 Dec 2009 02:01:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Dec 2009 02:01:09 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.117 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.117 us-mr1.zend.com Linux 2.4/2.6 Received: from [63.205.162.117] ([63.205.162.117:46974] helo=us-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/70-44737-462EA2B4 for ; Thu, 17 Dec 2009 21:01:08 -0500 Received: from us-gw1.zend.com (us-ex1.zend.net [192.168.16.5]) by us-mr1.zend.com (Postfix) with ESMTP id 0C5A2E123E; Thu, 17 Dec 2009 17:57:52 -0800 (PST) Received: from [192.168.16.93] ([192.168.16.93]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Dec 2009 18:01:06 -0800 Message-ID: <4B2AE263.7040600@zend.com> Date: Thu, 17 Dec 2009 18:01:07 -0800 Organization: Zend Technologies User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1pre Thunderbird/3.0 MIME-Version: 1.0 To: Tim Starling CC: PHP Developers Mailing List References: <4B2027FF.3050704@wikimedia.org> <4B202EE0.4020007@zend.com> <4B299B97.4040606@wikimedia.org> <4B2A865D.4090606@zend.com> <4B2ADFE2.8020900@wikimedia.org> In-Reply-To: <4B2ADFE2.8020900@wikimedia.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Dec 2009 02:01:06.0035 (UTC) FILETIME=[F58A7430:01CA7F85] Subject: Re: [PHP-DEV] PHP 5.3.1 reference parameter regression From: stas@zend.com (Stanislav Malyshev) Hi! > Yes, it works for me, in both the isolated test case and the original MW > bug. > > MW's parser test suite shows 4 failing tests in 5.3.1, all fixed with > this patch and no new regressions. Great, will commit the patch tomorrow then to all branches. > The underlying functions are declared with reference parameters, and we > call them with call_user_func_array() so explicitly creating references > on the caller side is required. If you have a better method for calling > arbitrary functions that accept reference parameters, let me know. call_user_func_array() wasn't a problem in this particular case, __call was (see the bug), because internally it's user function call simulated by internal function call, so it needed some special check. > Lots of MediaWiki functions are declared with reference parameters for > objects when they aren't really needed, because that was the required Entirely unrelated to this bug, passing objects by-ref is not the best idea in PHP 5. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com