Skip to content

Oversimplified huge const array #8636

@ddebin

Description

@ddebin

Bug report

Do you think we can disable the new optimization for huge const arrays?

Don't know if it can be considered a bug but my const is now oversimplified and the array shape is not guessed as precisely as it used to be with PHPStan <1.9.5.

Code snippet that reproduces the problem

https://phpstan.org/r/ba75c9cd-8683-421d-8996-742e72c108ea

Expected output

No error!

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

For sure, it's an amazing and helpful tool. 👏

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions