Thanks to visit codestin.com
Credit goes to github.com

Skip to content

numeric-string as array-key is int|string and not int only #4163

@voku

Description

@voku

Bug report

If there is a numeric type, and we cast it into a string, then it should be numeric&string or at least string but not int as in the next example.

Code snippet that reproduces the problem

https://phpstan.org/r/d13c93de-adae-4900-a9b9-b9331c13e992

Expected output

no error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions