This shows you the differences between two versions of the page.
uphp:functions:die [2017/03/18 19:22] jeff |
uphp:functions:die [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======die====== | ||
- | < | ||
- | |||
- | Kill the script | ||
- | |||
- | ====Description==== | ||
- | <well size=" | ||
- | </ | ||
- | |||
- | Terminates the current script | ||
- | |||
- | ====Parameters==== | ||
- | None | ||
- | |||
- | ====Return Value==== | ||
- | None | ||
- | |||
- | ====Examples==== | ||
- | <code php> | ||
- | <? | ||
- | die(); // nothing beyond this line will be executed | ||
- | while (1); // without the die() statement above we'd be stuck here until max_execution_time expires | ||
- | ?> | ||
- | </ | ||
- | |||
- | **Kill a script if not logged in as an adminstrator: | ||
- | |||
- | <code php> | ||
- | <? | ||
- | if ($_SESSION[' | ||
- | ?> | ||
- | </ | ||
- | |||
- | ====Additional Information==== | ||
- | Mainline PHP has a function or language construct '' | ||
- | |||
- | ====See Also==== | ||
- | [[process_kill()]] - Send a kill request to the process number | ||
- | |||
- | [[max_execution_time()]] - Set maximum execution time in seconds | ||