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>
<?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>
<?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.