Skip to content

false doesn't get subtracted after loose comparison #10338

@fluffycondor

Description

@fluffycondor

Bug report

PHPStan doesn't subtract false from type after a loose comparison with a falsable value.

Code snippet that reproduces the problem

https://phpstan.org/r/ef0ac074-0c71-43c3-81dd-bfcf3420241b

Expected output

No errors.

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

❤️❤️💘❤️❤️

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions