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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 03:01:33 2024 UTC