php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #33119 do-continue does not perform as documented
Submitted: 2005-05-24 10:01 UTC Modified: 2005-05-24 11:56 UTC
From: bugzilla at yakasha dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: OSx.3.8
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: bugzilla at yakasha dot net
New email:
PHP Version: OS:

 

 [2005-05-24 10:01 UTC] bugzilla at yakasha dot net
Description:
------------
continue documentation says, "...continue execution at the beginning of the next iteration."

To me, the beginning would mean the top, where it began.

I noticed that continue takes you to the bottom of a do loop.  According to the documentation (as I read it), the attached code should go into an endless loop.  However, it exits just fine.

I noticed that bug #3073 'fixed' this issue.  ie, continue used to go to the top, now goes to the bottom.

Reproduce code:
---------------
$x = 0;
do
{
  if( $x == 0 )
    continue;

} while( $x != 0 );

Expected result:
----------------
An endless loop that eventually times out

Actual result:
--------------
Absolutely nothing

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-24 11:56 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"continue is used within looping structures to skip the rest of the current loop iteration and continue execution at the condition evaluation and then the beginning of the next iteration."
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Feb 25 13:00:01 2026 UTC