Edit report at http://bugs.php.net/bug.php?id=44626&edit=1
ID: 44626 Comment by: chat dot noir at arcor dot de Reported by: HACGIS at gmail dot com Summary: call_user_func_array pass arguments by reference Status: Bogus Type: Bug Package: Variables related Operating System: Windows XP SP2 PHP Version: 5.3CVS-2008-04-03 (snap) Block user comment: N Private report: N New Comment: Why is this a warning? CONTINUING EXECUTION AFTER IGNORED CALLS IS EVIL Sorry for the caps, but I really mean it. Please make this at least an exception or fatal error until it is finally fixed. Previous Comments: ------------------------------------------------------------------------ [2008-04-03 11:08:25] j...@php.net 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. ------------------------------------------------------------------------ [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/bug.php?id=44626&edit=1