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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-03-01 22:09 UTC] rasmus
Your condition expression is wrong.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC