-
-
Notifications
You must be signed in to change notification settings - Fork 920
isset/empty wrongly considered as callable #6014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is interesting, I'd love to know what monster and where defined these as existing functions, but I'm too busy to debug that now :) |
For the record, the problem also concerns other reserved keywords.
( |
@villfa After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-3: Call to function is_callable() with 'empty' will always evaluate to true.
-4: Call to function is_callable() with 'isset' will always evaluate to true.
+3: Call to function is_callable() with 'empty' will always evaluate to false.
+4: Call to function is_callable() with 'isset' will always evaluate to false. Full report
|
Fixed: phpstan/phpstan-src@08f3e2d |
Thank you! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
empty()
andisset()
are considered as callable by PHPStan while they're not.Code snippet that reproduces the problem
https://3v4l.org/iMgPt
https://phpstan.org/r/c8e58374-a244-41c8-927c-1905a945389e
Expected output
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is an awesome tool. Thanks for your work!
The text was updated successfully, but these errors were encountered: