Bug #15750 Updated: reset() resets nested arrays too

From: Date: Thu, 28 Feb 2002 10:40:41 +0000
Subject: Bug #15750 Updated: reset() resets nested arrays too
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-1274@lists.php.net to get a copy of this message
ID: 15750 Updated by: yohgaki@php.net Reported By: yury@krasu.ru -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: FreeBSD-4.3 PHP Version: 4.0.6 New Comment: Sorry. We don't fix bugs for 4.0.6. It works as expected for current CVS. and 4.1.2. Use 4.1.2 ;) Previous Comments: ------------------------------------------------------------------------ [2002-02-27 01:16:02] yury@krasu.ru 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 this bug report at http://bugs.php.net/?id=15750&edit=1

« previous php.bugs (#1274) next »