php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #126 for loop sticks, doesn't terminate
Submitted: 1998-03-01 21:32 UTC Modified: 1998-03-01 22:09 UTC
From: zop12 at mindless dot com Assigned: rasmus (profile)
Status: Closed Package: Parser error
PHP Version: 3.0b5 OS: Linux 2.0.33/ANY
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: zop12 at mindless dot com
New email:
PHP Version: OS:

 

 [1998-03-01 21:32 UTC] zop12 at mindless dot com
To reproduce the problem the easiest thing to do is something like the following:

for ($i=1;$i=count($array) - 1;$i++) {
   <insert anything you like here...  Doesn't seem to matter>
};

It seems to loop forever getting stuck at whatever number
count($array) returns...  When I remove the - 1 then its OK.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-03-01 22:09 UTC] rasmus
Your condition expression is wrong.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Apr 26 11:01:26 2025 UTC