ID: 26030 Updated by: [EMAIL PROTECTED] Reported By: kevin at hatry dot com -Status: Verified +Status: Bogus Bug Type: Scripting Engine problem Operating System: Irrelevant PHP Version: Irrelevant 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. Because of this, we hope you add your comments to the existing bug instead. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2003-10-29 14:12:13] [EMAIL PROTECTED] Related to bug #25996 ------------------------------------------------------------------------ [2003-10-29 12:02:45] kevin at hatry dot com Description: ------------ When passing a non-existing portion of an array by reference this portion gets created even if the function does not touch the array => it is modified in the calling line. It works with string indexes as well. Reproduce code: --------------- error_reporting(E_ALL); $tab2 = array( ); function do_nothing ( &$var ) { // code here doesnt matter } do_nothing($tab2[10]); var_dump($tab2); Expected result: ---------------- array(0) { } Actual result: -------------- array(1) { [10]=> NULL } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26030&edit=1