Skip to content

False positive: strtotime($date) < time() is always true #5969

@schlndh

Description

@schlndh

Bug report

It looks like PHPStan is confused about (int|false) < int<1, max>, the fact that it's related to time functions is probably just because of the changes from 1.1.2.

Code snippet that reproduces the problem

https://phpstan.org/r/2096429c-7a1b-438a-9738-2be373692672

Expected output

No errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions