[PHP-DEV] PHP 4.0 Bug #8289: print_r doesn't reset() arrays From: cardinal <email protected>
Date: 12/15/00

From: cardinal <email protected>
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

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>