We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
exit()
exit
1 parent 7096729 commit 941ec64Copy full SHA for 941ec64
spec.md
@@ -766,6 +766,18 @@ $someInstance
766
->run();
767
```
768
769
+The `exit()` and `die()` functions SHOULD always be called with parentheses even if no argument is given to clearly
770
+distinguish them from an access to a constant named `exit` or `die`. For example:
771
+
772
+```php
773
+exit();
774
+exit(1);
775
+exit("Success!");
776
+die();
777
778
+$result = foo() ?? exit();
779
+```
780
781
### 4.8 Function Callable References
782
783
A function or method may be referenced in a way that creates a closure out of it, by providing `...` in place of arguments.
0 commit comments