Skip to content

False positive: Comparison operation ">" between 0 and 0 is always false. #8938

@phil-davis

Description

@phil-davis

Bug report

The type of "while strlen" construction in the example was passing phpstan. But now it fails on PHP7 (but looks like it passes on PHP8).

Code snippet that reproduces the problem

https://phpstan.org/r/0694abfa-be7c-47e9-ab0e-d2d6ca7dec80

Expected output

The code should pass phpstan, and was passing with 1.9

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

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