Skip to content
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

count() should filter out an empty array from union of constant arrays #3558

Closed
ondrejmirtes opened this issue Jul 1, 2020 · 2 comments
Closed
Labels
Milestone

Comments

@ondrejmirtes
Copy link
Member

Bug report

https://phpstan.org/r/0e3b1108-a4b1-4417-a1b8-b93e47eef072
https://phpstan.org/r/74f9deeb-80bf-4f7b-a862-7a48d7816500

@phpstan-bot
Copy link
Contributor

@ondrejmirtes PHPStan now reports different result with your code snippet:

@@ @@
-12: Strict comparison using === between array()|array(array(1, 2), array(1, 2), array(1, 2)) and 'aaa' will always evaluate to false.
+12: Strict comparison using === between array(array(1, 2), array(1, 2), array(1, 2)) and 'aaa' will always evaluate to false.
Full report
Line Error
12 Strict comparison using === between array(array(1, 2), array(1, 2), array(1, 2)) and 'aaa' will always evaluate to false.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants