PHP 4.0 Bug #4818: var_dump() does not keep cursor in arrays

From: Date: Mon, 05 Jun 2000 06:31:54 +0000
Subject: PHP 4.0 Bug #4818: var_dump() does not keep cursor in arrays
Groups: php.dev 
Request: Send a blank email to php-dev+get-20230@lists.php.net to get a copy of this message
From: waldschrott@kiffen.de Operating system: win2000 PHP version: 4.0.0 Release PHP Bug Type: Misbehaving function Bug description: var_dump() does not keep cursor in arrays var_dump() should not touch the cursors in arrays, it should work with a copy of this arrays, it should not manipulate them directly, performance is not needed using var_dump() - I think. One has to reset() every array after using var_dump(), it this is expected behaviour, it should be documented. Expected result: ab[dumped stuff]c Current result: ab[dumped stuff] <?php $t=array('a','b','c','d'); print reset($t); print next($t); var_dump($t); print next($t); ?>

« previous php.dev (#20230) next »