As of PHP 8.4, exit and die will become "special" function calls and when used as a constant, it will be transformed to a function call at compile time. See the RFC for full details.
With this in mind, it is appropriate to add T_EXIT to the functionCallTokens() and by inheritance to the parameterPassingTokens().
PassedParameters: minor update for support of exit
As the Collections::parameterPassingTokens() array now contains T_EXIT, exit and die will now also be analyzable via the methods in the PassedParameters class.
This commit:
Updates the documentation and the exception message to reflect this.
PHP 8.4 | Collections::functionCallTokens(): add T_EXIT
As of PHP 8.4,
exit
anddie
will become "special" function calls and when used as a constant, it will be transformed to a function call at compile time. See the RFC for full details.With this in mind, it is appropriate to add
T_EXIT
to thefunctionCallTokens()
and by inheritance to theparameterPassingTokens()
.Includes unit tests.
Ref: https://wiki.php.net/rfc/exit-as-function
PassedParameters: minor update for support of exit
As the
Collections::parameterPassingTokens()
array now containsT_EXIT
,exit
anddie
will now also be analyzable via the methods in thePassedParameters
class.This commit:
exit
anddie
.