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

is_resource() return value is inferred wrongly #5845

Closed
paranoiq opened this issue Oct 27, 2021 · 1 comment · Fixed by phpstan/phpstan-src#1617
Closed

is_resource() return value is inferred wrongly #5845

paranoiq opened this issue Oct 27, 2021 · 1 comment · Fixed by phpstan/phpstan-src#1617
Labels
Milestone

Comments

@paranoiq
Copy link
Sponsor Contributor

following example should have no errors, because is_resource() returns false on CLOSED resource and can be used for validation if given resource is open or closed:

https://phpstan.org/r/af634a66-2dc6-4226-9f63-0efaca69ad01

is_resouce() behavior: https://3v4l.org/sWd0q

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

Successfully merging a pull request may close this issue.

2 participants