ID: 26030 Updated by: [EMAIL PROTECTED] Reported By: kevin at hatry dot com -Status: Open +Status: Verified Bug Type: Scripting Engine problem -Operating System: windows + linux with php4.3.2 +Operating System: Irrelevant -PHP Version: 4.3.3 +PHP Version: Irrelevant New Comment:
Related to bug #25996 Previous Comments: ------------------------------------------------------------------------ [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