Skip to content

PHPStan mistakenly assumes that an array can pass the is_numeric() test #3133

@morozov

Description

@morozov

Bug report

According to the documentation, is_numeric() finds whether a variable is a number or a numeric string. Although, PHPStan thinks that a variable that passes the is-numeric test can contain an array.

Code snippet that reproduces the problem

https://phpstan.org/r/d65e6a61-95bd-44ac-8093-5afe354bf16c

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