Skip to content

ctype_digit: casted parameter does not get narrowed #8714

@staabm

Description

@staabm

Bug report

when casting a paramter at the callsite, the type narrowing does not happen

Code snippet that reproduces the problem

https://phpstan.org/r/b6730caf-760c-4d0a-8ea2-cf3349255366

Expected output

the above snippet should be narrowed the same way https://phpstan.org/r/8fcca391-df74-4a40-9291-8897d53293b5 is (which does not use a cast).

int<48, 57>|int<256, max>|numeric-string intead of mixed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions