From: sailormax at inbox dot lv Operating system: any PHP version: 5.2.0 PHP Bug Type: Scripting Engine problem Bug description: assignment reference returned by function
Description: ------------ PHP 4.x.x, returned value by reference, assign to variable reference. But 5.x.x assign copy of value... Reproduce code: --------------- function &ret_ref(&$arr) { return $arr; } $arr = array("111111", "2222222", "33333333"); $test = ret_ref($arr); $test[] = "4444444444"; print_r($arr); Expected result: ---------------- Array ( [0] => 111111 [1] => 2222222 [2] => 33333333 [3] => 4444444444 ) Actual result: -------------- Array ( [0] => 111111 [1] => 2222222 [2] => 33333333 ) -- Edit bug report at http://bugs.php.net/?id=39614&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39614&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39614&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39614&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39614&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39614&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39614&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39614&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39614&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39614&r=support Expected behavior: http://bugs.php.net/fix.php?id=39614&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39614&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39614&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39614&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39614&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39614&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39614&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39614&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39614&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39614&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39614&r=mysqlcfg