+
Skip to content

Modulo binary operation over array operands not reported #10440

@xificurk

Description

@xificurk

Bug report

Modulo operation over array operands is invalid, and throws TypeError since PHP 8.0

https://3v4l.org/Oj0IO

PHPStan currently does not catch this and reports no error.

Code snippet that reproduces the problem

https://phpstan.org/r/8f4d2110-362c-470c-a6e3-ce567367c87c

Expected output

Binary operation "%" between array{} and array{''} results in an error. error on line 6.

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载