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

substr - Strict comparison using === between string and false will always evaluate to false. #6939

Closed
williamdes opened this issue Mar 29, 2022 · 3 comments

Comments

@williamdes
Copy link

Bug report

It will return false, just see https://3v4l.org/jO0n4

https://phpstan.org/r/0c4f9d72-05e5-4403-922f-95564611c3ed

Code snippet that reproduces the problem

https://3v4l.org/jO0n4

Expected output

No error

Did PHPStan help you today? Did it make you happy in any way?

Saves me every day !

@herndlm
Copy link
Contributor

herndlm commented Mar 30, 2022

I'll take a look, pretty sure that's a "needs special handling for different PHP versions" kind of thing in SubstrDynamicReturnTypeExtension

@ondrejmirtes
Copy link
Member

Fixed by: phpstan/phpstan-src#1144

@github-actions
Copy link

github-actions bot commented May 1, 2022

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 May 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants