Skip to content

Error when strictly checking Collator::compare() result for false #4265

@vasekbrychta

Description

@vasekbrychta

Bug report

I'm getting error Strict comparison using === between int and false will always evaluate to false. when I'm strictly comparing result of Collator::compare() to false.

I'm running on php 8.0, phpstan version 0.12.63. It's not reported in phpstan version 0.12.62.

Code snippet that reproduces the problem

https://phpstan.org/r/ea73cd1b-75d5-41e2-9bf2-7e9a73063bb5

Expected output

No error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions