From: [EMAIL PROTECTED]
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 [EMAIL PROTECTED]
--
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