Skip to content

Dumping an array type causes phpstan to forget what it knew about the type #7803

@mad-briller

Description

@mad-briller

Bug report

Using PHPStan\dumpType to investigate types causes side-effects on the inspected types when the type is an array:

Code snippet that reproduces the problem

https://phpstan.org/r/9f986651-78d9-45c7-8718-d6a7f7eedc9e

Expected output

I would expect the same output for count in both locations.

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

As always, it helps me and my org. every day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions