Skip to content

is_resource() return value is inferred wrongly #5845

@paranoiq

Description

@paranoiq

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions