Why is exit() marked as internal function?
#14438
-
|
I have a code that contains somthing like $f = exit(...);I'd like the "exit behaviour" to be configurable by the caller, e.g they might want to use their framework's way of exit, or something like that. PHPStan with bleeding edge config flags the line as "Call to internal function exit()." I've figured this is because the bleeding edge config sets public function isInternal(): TrinaryLogic
{
return TrinaryLogic::createYes();
}here https://github.com/phpstan/phpstan-src/blob/53123fa4950d2dc08c89fb28d74a71ce4ecf00dd/src/Reflection/Php/ExitFunctionReflection.php#L101-L104 I'm trying to understand why is |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
It's a mistake, the linked method should return no 😊 Please send a PR. I often exchange "internal" and "built-in" by mistake and this is one of those cases. |
Beta Was this translation helpful? Give feedback.
-
|
Cool, thanks phpstan/phpstan-src#5420 |
Beta Was this translation helpful? Give feedback.
It's a mistake, the linked method should return no 😊
Please send a PR. I often exchange "internal" and "built-in" by mistake and this is one of those cases.