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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: navyism at chol dot com
New email:
PHP Version: OS:

 

 [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

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: Wed Sep 11 19:01:27 2024 UTC