Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP die() Function

PHP die() Function

PHP Misc Reference Manual PHP Misc Reference Manual

Example

Output a message and exit the current script:


Definition and Usage

The die() function outputs a message and exits the current script.

This function is an alias of the exit() function.


Syntax

die(

message

)

Parameters Description
message Required. Specifies the message or status number to write before exiting the script. The status number is not written to the output.

Technical Details

Return Value: No value is returned.
PHP Version: 4+

PHP Misc Reference Manual PHP Misc Reference Manual