|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-12-03 08:52 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 08:00:02 2025 UTC |
This caught me out: unset($tarray); unset($undefined); $tarray["one"] = 1; $undefined =& $tarray["two"]; while (list($key, $value) = each($tarray)) { echo $key . "|" . $value . "<br>"; } That code will generate this output: one|1 two| So you can see that the 4th line of the code creates a key "two" in the array with an unset value. I don't think it should do that. After all, this code: unset($undefined); unset($not_there); $undefined =& $not_there; generates precisely nothing.