note 109261 added to control-structures.break
| From: | philthathril at gmail dot com | Date: | Sat, 30 Jun 2012 21:00:15 +0000 |
| Subject: | note 109261 added to control-structures.break | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188981@lists.php.net to get a copy of this message | ||
steve at electricpocket dot com: " world" does not print out because a fatal error has
occurred because you cannot have "break" not in a loop. A slight modification to your
script will show you what's happening...
<?php
error_reporting(E_ALL);
echo "hello";
if (true) break;
echo " world";
?>
"Fatal error: Cannot break/continue 1 level in <your file> on line 4"
----
Server IP: 192.41.42.26
Probable Submitter: 99.57.153.22
----
Manual Page -- http://www.php.net/manual/en/control-structures.break.php
Edit -- https://master.php.net/note/edit/109261
Del: integrated -- https://master.php.net/note/delete/109261/integrated
Del: useless -- https://master.php.net/note/delete/109261/useless
Del: bad code -- https://master.php.net/note/delete/109261/bad+code
Del: spam -- https://master.php.net/note/delete/109261/spam
Del: non-english -- https://master.php.net/note/delete/109261/non-english
Del: in docs -- https://master.php.net/note/delete/109261/in+docs
Del: other reasons-- https://master.php.net/note/delete/109261
Reject -- https://master.php.net/note/reject/109261
Search -- https://master.php.net/manage/user-notes.php