[php-src] PR #15433: PHP 8.4 | Exit as function: fix incorrect parameter name

From: Date: Thu, 15 Aug 2024 20:07:40 +0000
Subject: [php-src] PR #15433: PHP 8.4 | Exit as function: fix incorrect parameter name
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-27983@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/15433 Author: jrfnl 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. --- P.S.: I hope I got it right, but can't test locally, so I'm opening this in draft to see the CI results and keeping my :crossed_fingers:.

« previous php.git-pulls (#27983) next »