#13637·phpstan

Array might not have offset, if array is deep

Author: imhdCePoCreated Oct 5, 2025Updated Sep 15, 2026
Labelsbug

Bug report

Somewhere between version 2.1.22 and 2.1.30, the following started to be a problem:

https://phpstan.org/r/b6995229-1713-43e7-a6eb-a761ceec3b82

If array is very deep, only first offset of an array is considered and other are ignored in the function.

Code snippet that reproduces the problem

https://phpstan.org/r/b6995229-1713-43e7-a6eb-a761ceec3b82

Expected output

No errors.

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

No response