Skip to content

Binary operation not allowed for numeric string #2964

@larsnystrom

Description

@larsnystrom

Bug report

I expected that when is_numeric returns true for a variable, that variable can be used in a mathematical expression, but it results in Binary operation between string and x results in error.

Also: Thank you for phpstan!

Code snippet that reproduces the problem

https://phpstan.org/r/e58d476f-a25b-480d-8df7-8c869da92f9a

Expected output

No errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions