PHP 4.0 Bug #8289: print_r doesn't reset() arrays
| From: | cardinal at dodds dot net | Date: | Sat, 16 Dec 2000 04:15:20 +0000 |
| Subject: | PHP 4.0 Bug #8289: print_r doesn't reset() arrays | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-41561@lists.php.net to get a copy of this message | ||
From: cardinal@dodds.net
Operating system: Linux
PHP version: 4.0 Latest CVS (15/12/2000)
PHP Bug Type: Arrays related
Bug description: print_r doesn't reset() arrays
After using print_r() on an array, the array pointer isn't reset. Affects 4.0.3pl1 and 4.0.4
CVS.
$arr['a'] = 'Apple';
$arr['b'] = 'Banana';
$arr['c'] = 'Corn';
print_r($arr);
//reset($arr);
while(list($k,$v) = each($arr))
echo "$k => $v\n";
--
Edit Bug report at: http://bugs.php.net/?id=8289&edit=1