Skip to content

Fix count($x) > $n === true negation#3037

Merged
ondrejmirtes merged 1 commit into
phpstan:1.10.xfrom
rvanvelzen:bug-10952
May 3, 2024
Merged

Fix count($x) > $n === true negation#3037
ondrejmirtes merged 1 commit into
phpstan:1.10.xfrom
rvanvelzen:bug-10952

Conversation

@rvanvelzen

Copy link
Copy Markdown
Contributor

@ondrejmirtes ondrejmirtes merged commit 0b6d92d into phpstan:1.10.x May 3, 2024
@ondrejmirtes

Copy link
Copy Markdown
Member

Awesome, thank you!

@rvanvelzen

Copy link
Copy Markdown
Contributor Author

The same problem actually applies to strlen(), maybe one day I'll submit a PR for that too :)

@staabm

staabm commented May 3, 2024

Copy link
Copy Markdown
Contributor

The same problem actually applies to strlen(), maybe one day I'll submit a PR for that too :)

@rvanvelzen I tried replicating this problem for strlen() but did not succeed:
https://phpstan.org/r/fa21633d-7311-406a-8959-cbb4a488a61d

@rvanvelzen

Copy link
Copy Markdown
Contributor Author

@staabm the problem occurs when wrapping the condition with (...) === true: https://phpstan.org/r/8adcd9e6-501f-4e37-a175-001c753a4153

@rvanvelzen rvanvelzen deleted the bug-10952 branch May 3, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants