ID: 48018 Updated by: j...@php.net Reported By: j dot jeising at gmail dot com -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: - PHP Version: 5.2.9 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2009-04-19 17:43:38] j dot jeising at gmail dot com Description: ------------ It's possible to define a reference to a non-existent variable, which gets assigned in a loop (example 1). It's possble to define a reference to an existent key, too. Why is it not possible to define references to non existent respective reference defined keys? Reproduce code: --------------- // Example 1: $a = array (1, 2, 3); $b = &$value; foreach ($a as $value) { echo $b; } // Example 2: $a = array(array(1), array(2), array(3)); foreach ($a as $value) { $b = &$value[0]; echo $b; } // Example 3: $b = &$value[0]; foreach ($a as $value) { echo $b; } Expected result: ---------------- 123 123 123 Actual result: -------------- 123 123 (nullnullnull) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48018&edit=1