← All built-ins / exit()
exit()
exit(...$args): void
Parameters
| Name | Type | Description |
|---|---|---|
| $code | int | process exit code (default 0)optional |
Return value
Terminates the program immediately.
Example
echo "before";
if (true) { exit(0); }
echo "unreachable";before