#23395 [NEW]: for loop = infinite loop in RC2
| From: | sprice at wisc dot edu | Date: | Tue, 29 Apr 2003 03:33:41 +0000 |
| Subject: | #23395 [NEW]: for loop = infinite loop in RC2 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-38671@lists.php.net to get a copy of this message | ||
From: sprice at wisc dot edu
Operating system: Mac OS X.2.5
PHP version: 4.3.2RC2
PHP Bug Type: Unknown/Other Function
Bug description: for loop = infinite loop in RC2
With this loop:
<?php
for( $i = 1; $i <= 10000; $i *= 10 ){
echo 'foo ';
}
?>
PHP drops into an infinite loop (lots of 'foo' gets
printed). This problem didn't exist in PHP 4.3.2-RC1.
When changed to "; $i += 10 ){" it works as expected.
When changed to "; $i *= 9 ){" only one 'foo' is
printed.
When changed to "; $i *= 11 ){" it is infinite.
When changed to "; $i *= 100 ){" only one 'foo' is
printed.
Weird.
--
Edit bug report at http://bugs.php.net/?id=23395&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23395&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23395&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23395&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23395&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23395&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23395&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23395&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23395&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23395&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23395&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23395&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23395&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23395&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23395&r=gnused