Bug report
PHPStan cannot be certain of class field types inside a closure, regardless of whether they were initialized outside of the closure.
Code snippet that reproduces the problem
https://phpstan.org/r/f9c6e122-a753-4fdf-b729-a5523443e71d
Expected output
No error should be reported. By the time the closure is invoked, the array may contain something.
Did PHPStan help you today? Did it make you happy in any way?
It's cool to see all the new stuff brought by 1.9