|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-06-09 15:23 UTC] andi at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 13:00:01 2025 UTC |
It seems that the 'unset' function fails to handle empty array keys properly: <? $z = array(); unset($key); echo "Test unset with key = '$key'<br>\n"; $z[$key] = 1; unset($z[$key]); while( list($k, $v) = each($z) ){ echo "$k: $v <br>\n"; } $z = array(); $key = 9; echo "Test unset with key = '$key'<br>\n"; $z[$key] = 1; unset($z[$key]); while( list($k, $v) = each($z) ){ echo "$k: $v <br>\n"; } ?>