Skip to content

Detect always false when use static value as non-static in isset() #8668

@szal1k

Description

@szal1k

Feature request

Hi, thanks for one of the best tools - phpstan! I have one suggestion, this is sample code: https://phpstan.org/r/9e546c06-b23c-46c0-a6a0-b6239bfea4a6

When we declared static property in class, and use it as non-static in isset() function, then always get false. It is no problem when use without isset, because parser return an error, but it would be nice if phpstan could help detect usage in isset for example.

What do you think about it?

Best regards!

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

I slept an extra hour today, modest thanks to phpstan!

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