php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30307 unknown unterminated loop
Submitted: 2004-10-02 04:36 UTC Modified: 2004-10-02 15:33 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: navyism at chol dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.8 OS: linux
Private report: No CVE-ID: None
 [2004-10-02 04:36 UTC] 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

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-02 15:33 UTC] sniper@php.net
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..)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Aug 17 18:01:30 2024 UTC