die
Equivalent to exit()
die()
function outputs a message and exits the current script.
This function is an alias for the exit() function.
Print a message and terminate the current script:
<?php $site = "http://www.gitbox.net/" ; fopen ( $site , "r" ) or die ( "Unable to connect to $site " ) ; ?>
die ( message )
parameter | describe |
---|---|
message |
Required. The message or status number to be printed before termination of the script. The status number is not written to the output, but is only used as an exit status. |
If message is a string, the function outputs the string before exiting.
If message is an integer, this value will be used as the exit status. The value of the exit status is between 0 and 254. Exit status 255 is reserved by PHP and will not be used. Status 0 is used to successfully terminate the program.