#29285 [Opn->Bgs]: taking array reference creates value
| From: | derick@php.net | Date: | Tue, 20 Jul 2004 20:28:15 +0000 |
| Subject: | #29285 [Opn->Bgs]: taking array reference creates value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-63190@lists.php.net to get a copy of this message | ||
ID: 29285
Updated by: derick@php.net
Reported By: fred dot leitz at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: FreeBSD 5.2.1-p9
PHP Version: 4.3.7
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:
------------------------------------------------------------------------
[2004-07-20 20:35:20] fred dot leitz at gmail dot com
Description:
------------
When taking a reference from an associative array where the key does
not exist a key is created and the value set to null.
Reproduce code:
---------------
$test = array();
$x = &$test["test"];
print_r($test);
Expected result:
----------------
Array ( )
Actual result:
--------------
Array ( [test] => )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29285&edit=1