|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
49 - 23 = ?
Subscribe to this entry?

 [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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-03-01 22:09 UTC] rasmus
Your condition expression is wrong.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Oct 04 10:01:25 2023 UTC