php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3073 do .. while with continue no longer works
Submitted: 1999-12-30 08:25 UTC Modified: 1999-12-31 07:56 UTC
From: danny dot heijl at cevi dot be Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (30/12/1999) OS: RH Linux 5.2 or 6.0
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: danny dot heijl at cevi dot be
New email:
PHP Version: OS:

 

 [1999-12-30 08:25 UTC] danny dot heijl at cevi dot be
The following works with PHP3 and used to work with PHP4.

You now get an endless loop :

<?php
$i = 10;
do {
   if ($i > 0) {
     echo $i . " is > 0 \n";
     continue;
   } else {
     echo $i . " is <= 0\n";
   }
} while (--$i > 0);
?>



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-31 07:56 UTC] andi at cvs dot php dot net
This is fixed in the latest CVS. However, it never worked with PHP 4 as far as I can tell.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC