★ wanayoo — archive 1999 http://www.php.net/manual/function.exit.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Misc.
Quick Reference
Misc.
* connection_aborted
* connection_status
* connection_timeout
* define
* defined
* die
* eval
* exit
* func_get_arg
* func_get_args
* func_num_args
* function_exists
* get_browser
* ignore_user_abort
* iptcparse
* leak
* pack
* register_shutdown_function
* serialize
* sleep
* uniqid
* unpack
* unserialize
* usleep
Manual: exit
View the source code for this pageSearch the site



Previous page
 eval
func_get_arg 
Next page


exit

exit -- Terminate current script

Description

void exit(void);

This language construct terminates parsing of the script. It does not return.

See also die().


User Contributed Notes: exit


lms@korax.net
15-Sep-1999 06:16
If an argument is supplied to exit(), it apparently returns that argument, regardless of its data type. For example
    exit(-1);
returns -1, and
    exit(array("one", "two"));
returns the array (PHP displays the string "Array").


sak@tribctas.gba.gov.ar
28-Feb-2000 02:38
suppose I have the following html page: <html> <some html> &lt;?php if (something I don't want) { exit; } ?> <footer html> </html> if the exit is executed, the footer html is never displayed, =why= ? is there a function that ends the php script, BUT continue with the rest of the page ?



28-Feb-2000 02:55
suppose I have the following html page: <br>
<html><br>
<some html> 
&lt;?php<br>
 if (something I don't want) { exit; }<br>
?> <br>
<footer html> <br>
</html><br>
<br> <br> if the exit is executed, the footer html is never displayed, =why= ?<br> is there a function that ends the php script, BUT continue with the rest of the page ?


ramorim@leiloesnet.com.br
16-Mar-2000 10:47
Check the comments on register_shutdown_function() and you'll see one way to do it. Of course, you can always right it yourself. :-) Roberto Amorim


philipp@gng.de
23-Apr-2000 05:27
To sak@tribctas.gba.gov.ar... have you tried using
return;
yet? -p


jeff_schnitter@peoplesoft.com
25-May-2000 02:55
Is there any way to exit with a return code from a stand alone PHP script? Since neither exit nor die take or return a value it does not look like it is possible.


 About Notes


Previous page
 eval
func_get_arg 
Next page



Site Statistics


Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.