We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
False positive on is_array() && !array_is_list() and later is_array()
is_array() && !array_is_list()
is_array()
https://phpstan.org/r/0687e733-025b-401f-8f21-21df9bdd1e88
Should not return error since there are still arrays that returned false for !array_is_list()
!array_is_list()
The text was updated successfully, but these errors were encountered:
@Niiph After the latest push in 1.11.x, PHPStan now reports different result with your code snippet:
@@ @@ -PHP 8.1 – 8.2 (1 error) +PHP 8.1 – 8.2 ========== -16: Call to function is_array() with mixed will always evaluate to false. +No errors PHP 7.2 – 8.0 (1 error) ========== 13: Function array_is_list not found.
No errors
Function array_is_list not found.
Sorry, something went wrong.
Fixed: phpstan/phpstan-src@de2566a
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.
No branches or pull requests
Bug report
False positive on
is_array() && !array_is_list()
and lateris_array()
Code snippet that reproduces the problem
https://phpstan.org/r/0687e733-025b-401f-8f21-21df9bdd1e88
Expected output
Should not return error since there are still arrays that returned false for
!array_is_list()
The text was updated successfully, but these errors were encountered: