Skip to content

Incorrect variable always exists #778

@lookyman

Description

@lookyman

Summary of a problem or a feature request

PHPStan incorrectly reports that a variable always exists in some cases.

Code snippet that reproduces the problem

https://phpstan.org/r/b0e37609338d0c49645295f039a0e73d

Expected output

PHPStan complains that Variable $handle in isset() always exists and is not nullable.. However, https://3v4l.org/nUfFW shows the actual output is ko, which means the isset gets evaluated to false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions