#35092 [NEW]: next() misbehavior

From: Date: Thu, 03 Nov 2005 19:37:20 +0000
Subject: #35092 [NEW]: next() misbehavior
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87494@lists.php.net to get a copy of this message
From: phbaer at npw dot net Operating system: Linux PHP version: 4.4.1 PHP Bug Type: Arrays related Bug description: next() misbehavior Description: ------------ next() misbehaves: it does not increment the internal position pointer with PHP 4.4.1 Reproduce code: --------------- <?php $test = array(); for ($i = 0; $i < 10; $i++) { $test[] = $i; } while (next($test)) { echo current($test) . "<br />"; } ?> Expected result: ---------------- 1 2 3 4 5 6 7 8 9 Actual result: -------------- 1 1 1 1 1 1 1 1 1 -- Edit bug report at http://bugs.php.net/?id=35092&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35092&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35092&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35092&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35092&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35092&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35092&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35092&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35092&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35092&r=support Expected behavior: http://bugs.php.net/fix.php?id=35092&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35092&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35092&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35092&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35092&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35092&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35092&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35092&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35092&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35092&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35092&r=mysqlcfg

« previous php.bugs (#87494) next »