Bug report
phpstan gives error "Empty array passed to foreach." within an associative array with arrays as values, but those internal arrays are not empty.
Code snippet that reproduces the problem
https://phpstan.org/r/579c6091-9983-45ee-bcfa-54565c3d38be
Expected output
no error
Notes
Note that there are no errors if we replace
foreach ([0,1] as $i) {
by
foreach ([0] as $i) {
or if we replace:
$arr[$i] = [];array_push($arr[$i], "foo");
by
$arr[$i] = ["foo"];