[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    Re: [PHP-DEV] PHP 5.3.1 reference parameter regression
From:       Stanislav Malyshev <stas () zend ! com>
Date:       2009-12-18 2:01:07
Message-ID: 4B2AE263.7040600 () zend ! com
[Download RAW message or body]

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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic