Skip to content

PHPStan found a error when the result of the filter_var function is compared with false #8516

@stramunin

Description

@stramunin

Bug report

PHPStan 1.9.2

Why is an error thrown if a function filter_var returns false when filtering failed?

Code snippet that reproduces the problem

https://phpstan.org/r/d01c48b0-59eb-4927-9a10-5459d2872646

Expected output

[OK] No errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions