|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-10-05 17:13 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2012-10-05 17:13 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 00:00:02 2025 UTC |
Description: ------------ If getting an array with mixed index types (in this case it was served from LDAP) - iterating over using a foreach loop yielded incorrect key values on the first changed index from associative to numerical. Test script: --------------- <?php $d = array(); $d['text'] = 1; $d[0] = 1; $d[1] = 2; foreach ($d as $k=>$v) { if ($k == "text") { echo 'Should Only See Once'; } else { echo $v; } } ?>