PHP exit() Function

PHP Misc Reference : Print a message and exit the current script

Definition and Usage

The exit() function prints a message and terminates the current script.

Syntax

exit(message)

Parameter Values

Parameter Description
message Required. A message or status number to print before terminating the script. A status number will not be written to the output, just used as the exit status.

Technical Details

Return Value: Nothing
PHP Version: 4+

❮ PHP Misc Reference