PHP - exit
Trieda
Metóda - exit
(PHP 4, PHP 5, PHP 7)
exit terminates the running script and shows a message if a
parameter is passed. It is a language construct and it does not need any
parameters.
Shutdown functions, as well as object destructors, are even executed after
the exit call.
Procedurálne
Parametre
| Názov | Dátový typ | Predvolená hodnota | Popis |
|---|---|---|---|
| $status | int | The message printed on exiting the script. The number in the range 0-255. 255 is reserved by PHP and shall not be used, 0 means a successful completion of the script. | |
| $status | int | The message printed on exiting the script. The number in the range 0-255. 255 is reserved by PHP and shall not be used, 0 means a successful completion of the script. |
Mávratovej hodnoty
Vracia: void
No value is returned.
Príklady
<?php
class ICT {
public function __destruct() {
echo ("The descructor of the ICT class. ");
}
}
$ict = new ICT();
exit('The script ends. ');
