Skip to content

is_subclass_of is true only for parent classes, not the same one #6305

@mvorisek

Description

@mvorisek

Bug report

is_subclass_of(new A(), A::class) is false, phpstan assumes true

Code snippet that reproduces the problem

https://3v4l.org/Z4Yb2

https://phpstan.org/r/b41d286a-72cb-45a7-b48f-5dbedc4dee73

Expected output

Call to function is_subclass_of() with B and 'A' will always evaluate to true. only

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions