This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:die [2017/02/22 13:17] jeff |
uphp:functions:die [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
======die====== | ======die====== | ||
+ | |||
< | < | ||
Line 5: | Line 6: | ||
====Description==== | ====Description==== | ||
- | <well size=" | + | |
- | </ | + | <well size=" |
+ | <span style=" | ||
+ | </ | ||
Terminates the current script | Terminates the current script | ||
====Parameters==== | ====Parameters==== | ||
+ | |||
None | None | ||
- | ====Return | + | ====Return |
None | None | ||
====Examples==== | ====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 | ||
- | ?></ | ||
- | <code php><? | + | <code php> |
- | //kill the script if not logged in as an administrator: | + | <? |
- | if ($_SESSION[' | + | |
- | ?></ | + | while (1); // without |
+ | ?> | ||
+ | </ | ||
+ | |||
+ | ===Kill a script if not logged in as an administrator=== | ||
+ | |||
+ | <code php> | ||
+ | <? | ||
+ | if ($_SESSION[' | ||
+ | ?> | ||
+ | </ | ||
====Additional Information==== | ====Additional Information==== | ||
+ | |||
Mainline PHP has a function or language construct '' | Mainline PHP has a function or language construct '' | ||
====See Also==== | ====See Also==== | ||
- | [[process_kill()]] - Send a kill request to the process number | ||
- | |||
- | [[max_execution_time()]] - Set maximum execution time in seconds | ||
- | [[uphp: | + | [[process_kill()]] - Send a kill request to a process |
+ | [[max_execution_time()]] - Set the maximum execution time for the current script | ||