note 29536 added to control-structures
| From: | php-general at lists dot php dot net | Date: | Sun, 16 Feb 2003 21:23:30 +0000 |
| Subject: | note 29536 added to control-structures | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44070@lists.php.net to get a copy of this message | ||
An item that should be added to the Table of Contents on this page:
exit
And for its description (on a new page):
exit -- Terminate all script execution for this request. (For HTTP requests, this causes the
response generated thus far to be sent to the browser.)
Use "return" to terminate the current script only and return to any script that included
it (resuming execution at the point after the include).
"exit" can be used immediately following a "require" or "include" to
simulate unconditional branching (i.e. "go to") to another script file.
"Exit" is a language construct but is often treated as a function. The parentheses are
unnecessary unless a status needs to be returned.
--
http://www.php.net/manual/en/control-structures.php
http://master.php.net/manage/user-notes.php?action=edit+29536
http://master.php.net/manage/user-notes.php?action=delete+29536
http://master.php.net/manage/user-notes.php?action=reject+29536