php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63210 cannot continue from included file
Submitted: 2012-10-03 14:07 UTC Modified: 2012-10-05 04:36 UTC
From: qdinar at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: Irrelevant OS: linux
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: qdinar at gmail dot com
New email:
PHP Version: OS:

 

 [2012-10-03 14:07 UTC] qdinar at gmail dot com
Description:
------------
continue from within/inside included php script, that is included in while loop, do not work. error message: "... mod_fcgid: stderr: PHP Fatal error:  Cannot break/continue 1 level in ...".

Test script:
---------------
includeinwhile.php
<?php

$i=0;
while ($i<100){
include('includedinwhile.php');
}

echo 'OK, $i='.$i;

?>

includedinwhile.php

<?php

$i+=5;
continue;

?>

Expected result:
----------------
OK, $i=100


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-05 04:36 UTC] laruence@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

a php script is a individual scope, like a function, you can not break into 
another scope from the inner scope.
 [2012-10-05 04:36 UTC] laruence@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 10:01:32 2025 UTC