ID: 44626
Updated by: [EMAIL PROTECTED]
Reported By: HACGIS at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: Windows XP SP2
PHP Version: 5.3CVS-2008-04-03 (snap)
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2008-04-03 09:47:59] HACGIS at gmail dot com
Description:
------------
When a user function has some arguments which pass by reference, and
use call_user_func_array to call the function, I find a bug.
In PHP 5.2 the code doesn't have any warning, But in PHP 5.3 snap I get
a warning.
Reproduce code:
---------------
function test(&$arg){
echo $arg;
}
$arg = 'OK<br>';
$arg_array1 = array(&$arg);
$arg_array2 = array($arg);
call_user_func_array('test', $arg_array1); // OK
call_user_func_array('test', $arg_array2); // get Warning
Expected result:
----------------
OK
OK
Actual result:
--------------
OK
Warning: Parameter 1 to test() expected to be a reference, value given
in D:\DevWeb.bak\UserDir\test\index.php on line 9
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44626&edit=1