Bug #69259 [Opn->Ver]: One reference passing fail with call_user_func_array() causes other fails

From: Date: Thu, 19 Mar 2015 08:02:31 +0000
Subject: Bug #69259 [Opn->Ver]: One reference passing fail with call_user_func_array() causes other fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191460@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69259&edit=1 ID: 69259 Updated by: demon@php.net Reported by: ryosuke_i_628 at yahoo dot co dot jp Summary: One reference passing fail with call_user_func_array() causes other fails -Status: Open +Status: Verified Type: Bug Package: *General Issues PHP Version: Irrelevant -Assigned To: +Assigned To: demon Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2015-03-19 05:36:27] ryosuke_i_628 at yahoo dot co dot jp Description: ------------ One reference passing fail with call_user_func_array() causes other fails. HHVM is already fixed on this issue, however, PHP 7 still has this problem. http://3v4l.org/jd9Nd Test script: --------------- <?php function inc(&$a, &$b) { ++$a; ++$b; } $a = 1; $b = 1; $params = array($a, &$b); call_user_func_array('inc', $params); var_dump($params); Expected result: ---------------- Warning: Parameter 1 to inc() expected to be a reference, value given in ... on line ... array(2) { [0]=> int(1) [1]=> &int(2) } Actual result: -------------- Warning: Parameter 1 to inc() expected to be a reference, value given in ... on line ... array(2) { [0]=> int(1) [1]=> &int(1) } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69259&edit=1

« previous php.bugs (#191460) next »