Skip to content

Strict comparison using === between 4 and 4 will always evaluate to true. #4242

@SergeC

Description

@SergeC

Bug report

I have a code in my project like in case1 in a code sample which triggers the following error. In case2 is the same code snippet with sorted elseif branches.

Code snippet that reproduces the problem

https://phpstan.org/r/1b70ab7b-24e9-4507-bb77-c175607bf78f

Expected output

The case1 example must work without an 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