ID: 38607 Updated by: [EMAIL PROTECTED] Reported By: kilgor at twojepc dot pl -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows/Linux PHP Version: 5.1.5 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . Previous Comments: ------------------------------------------------------------------------ [2006-08-26 10:21:15] kilgor at twojepc dot pl Description: ------------ PHP 5.1.1 is the last version of PHP which gave expected result of this statement. I noticed that next versions return wrong result. I tested PHP version 5.1.2, 5.1.4, 5.1.6 and the all returned unexpected (wrong) result. As you can see, the mistake appeares when you assign value to the variable which is passed to function as a reference: In my example: test($i=array()); Reproduce code: --------------- <? function test(&$x) { $x[]=1; $x[]=2; $x[]=3; } test($i=array()); $i[]=4; var_dump($i); ?> Expected result: ---------------- array(4) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) } Actual result: -------------- array(1) { [3]=> int(4) } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38607&edit=1