#23395 [Opn]: for loop = infinite loop in RC2
| From: | sprice at wisc dot edu | Date: | Tue, 29 Apr 2003 05:30:39 +0000 |
| Subject: | #23395 [Opn]: for loop = infinite loop in RC2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38677@lists.php.net to get a copy of this message | ||
ID: 23395
User updated by: sprice at wisc dot edu
Reported By: sprice at wisc dot edu
Status: Open
Bug Type: Unknown/Other Function
Operating System: Mac OS X.2.5
PHP Version: 4.3.2RC2
New Comment:
BTW:
<?php
$i = 1;
$i *= 10;
echo $i;
?>
yields:
-2123890688
Previous Comments:
------------------------------------------------------------------------
[2003-04-28 22:35:32] sprice at wisc dot edu
I forgot to mention, configure:
./configure --with-apxs
------------------------------------------------------------------------
[2003-04-28 22:33:41] sprice at wisc dot edu
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 this bug report at http://bugs.php.net/?id=23395&edit=1