php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #62222 Continue 0; is invalid
Submitted: 2012-06-04 09:14 UTC Modified: 2012-06-04 13:26 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: maik at phpkuh dot de Assigned: nikic (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.4.3 OS: Ubuntu 12.04
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: maik at phpkuh dot de
New email:
PHP Version: OS:

 

 [2012-06-04 09:14 UTC] maik at phpkuh dot de
Description:
------------
---
From manual page: http://www.php.net/control-structures.continue
---

Using continue 0; will fail under PHP 5.4:

Same is true for break 0; but documentation is wrong only for continue and incomplete for http://php.net/manual/en/migration54.incompatible.php (not sure, but can't see other statements affected).

Did not check translations.

Test script:
---------------
<?php

do {
    continue 0;
} while(false);

echo 'passed';

Expected result:
----------------
passed

Actual result:
--------------
PHP Fatal error:  'continue' operator accepts only positive numbers 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-04 09:52 UTC] shiranai7 at hotmail dot com
I can confirm this. The doc translations also contain the information about 
continue 0; behaving the same way as continue;

This information should be enhanced by adding that this is true only until 5.4. 
Since then the optional numeric argument must be greater than or equal to 1.
 [2012-06-04 13:22 UTC] nikic@php.net
Automatic comment from SVN on behalf of nikic
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=325967
Log: Fix doc bug #62222: Continue 0; is invalid
 [2012-06-04 13:26 UTC] nikic@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.


 [2012-06-04 13:26 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 03:00:02 2026 UTC