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

Add a Patch

Pull Requests

Add a Pull Request

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: Mon Apr 29 17:01:29 2024 UTC