#
4c5767f6 |
| 16-Aug-2024 |
Juliette <663378+jrfnl@users.noreply.github.com> |
PHP 8.4 | Exit as function: fix incorrect parameter name (#15433) Follow up on 13483 As previously reported in https://github.com/php/php-src/pull/13483#discussion_r1718546927:
PHP 8.4 | Exit as function: fix incorrect parameter name (#15433) Follow up on 13483 As previously reported in https://github.com/php/php-src/pull/13483#discussion_r1718546927: > The parameter names seem to be incorrect. > > It should be `$status`, not `$code`. > > The RFC explicitly uses that parameter name in the proposal: https://wiki.php.net/rfc/exit-as-function#proposal > > It is also the name already used in the [manual](https://www.php.net/exit). > > Lastly, the parameter name `$status` better covers what can be passed: either a status _message_ or a status _code_. > While `$code` would read pretty weird when passing a message: > ```php > exit(code: 'message'); > ``` This commit attempts to fix this. Includes adding a test for exit/die using a named argument. Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
show more ...
|