Bug #15750: reset() resets nested arrays too

From: Date: Wed, 27 Feb 2002 06:16:03 +0000
Subject: Bug #15750: reset() resets nested arrays too
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-1165@lists.php.net to get a copy of this message
From: yury@krasu.ru Operating system: FreeBSD-4.3 PHP version: 4.0.6 PHP Bug Type: Arrays related Bug description: reset() resets nested arrays too Thais kind of error does NOT occur at PHP4.1 for Win32, but I have no opportunity to check it at the same version PHP for FreeBSD. Example: <? $group = array(array(1, 2, 3), array(4, 5, 6)); $count = 2; for ($c = 0; $c < $count; $c++) { reset($group); while (list($i) = each($group)) { list($key, $val) = each($group[$i]); echo "$val "; } } ?> That scrips produces "1 4 2 5 " at PHP4.1.0@Win32 but "1 4 1 4" at PHP4.0.6@FreeBSD4.3 -- Edit bug report at http://bugs.php.net/?id=15750&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15750&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15750&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15750&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15750&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15750&r=support Expected behavior: http://bugs.php.net/fix.php?id=15750&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15750&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15750&r=submittedtwice

« previous php.bugs (#1165) next »