#30307 [Opn->Bgs]: unknown unterminated loop

From: Date: Sat, 02 Oct 2004 13:33:15 +0000
Subject: #30307 [Opn->Bgs]: unknown unterminated loop
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-67032@lists.php.net to get a copy of this message
ID: 30307 Updated by: sniper@php.net Reported By: navyism at chol dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: linux PHP Version: 4.3.8 New Comment: Works fine with latest CVS snapshot. Bogusing since you failed to try that one first. (and try setting 'error_reporting = E_ALL' once in a while..) Previous Comments: ------------------------------------------------------------------------ [2004-10-02 04:36:43] navyism at chol dot com Description: ------------ "$a = $a . $b;" make a unterminated loop. -> my solutions 1. $a = $a . $b; => $a .= $b; 2. for ($i=0; $i<10; $i++) => for ($i=0; $i<(int)10; $i++) Reproduce code: --------------- <? $a = $a . $b; $a = $a . $b; $a = $a . $b; $a = $a . $b; $a = $a . $b; $a = $a . $b; $a = $a . $b; for ($i=0; $i<10; $i++) { if($i > 100) die('stop@A'); } for ($i=0; $i<10; $i++) { if($i > 100) die('stop@B'); } for ($i=0; $i<10; $i++) { if($i > 100) die('stop@C'); } die('OK'); ?> Expected result: ---------------- OK Actual result: -------------- stop@A ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30307&edit=1

« previous php.bugs (#67032) next »