Hướng dẫn exit in php w3schools
❮ PHP Misc Reference Show ExamplePrint a message and exit the current script: $site = "https://www.w3schools.com/"; Definition and UsageThe exit() function prints a message and terminates the current script. SyntaxParameter Values
Technical Details
❮ PHP Misc Reference Complete PHP Misc Reference Definition and UsageThe exit() function prints a message and exits the current script. This function is an alias of the die() function. Syntaxexit(message)
ExampleComplete PHP Misc Reference
(PHP 4, PHP 5, PHP 7, PHP 8) exit — Output a message and terminate the current script Descriptionexit(string exit(int
Parametersstatus If If Return ValuesNo value is returned. ExamplesExample #1
= '/path/to/data-file'; Example #2
Example #3 Shutdown functions and destructors run regardless
shutdown() The above example will output: Shutdown: shutdown() Destruct: Foo::__destruct() albert at removethis dot peschar dot net ¶ 13 years ago
dexen dot devries at gmail dot com ¶ 11 years ago
if (SOME_EXIT_CONDITION) theonenkl at gmail dot com ¶ 7 years ago
"In try, exiting\n"; vincent dot laag at gmail dot com ¶ 11 years ago
void a t informance d o t info ¶ 13 years ago
emils at tvnet dot lv ¶ 19 years ago
sunfundev at gmail dot com ¶ 5 years ago
B m dot libergolis at gmail dot com ¶ 7 years ago
alexyam at live dot com ¶ 10 years ago
devinemke at devinemke dot com ¶ 20 years ago
|