Skip to content

Right side of instanceof operator is always evaluated when evaluated #6112

@mvorisek

Description

@mvorisek

Bug report

Variable defined in if or expr is always defined, but reported as undefined.

Code snippet that reproduces the problem

https://phpstan.org/r/2f2a7985-770e-475f-b7b9-e1baee21eb09

Expected output

no error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions