Skip to content

Wrong int inference after a max call. #8088

@VincentLanglet

Description

@VincentLanglet

Bug report

Hi, I have a weird behavior from PHPStan about max method.
This wasn't reported in 1.8.2 and now are reported by 1.8.6

Code snippet that reproduces the problem

https://phpstan.org/r/5b811b7d-6903-45bc-9a90-59e4e5ab8ef4

The result can be any int between 0 and 11, but phpstan is considering it's always 11.

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