### Bug report In the following example https://phpstan.org/r/3ac09ec1-e62e-42b0-b853-06a1450c238f The array $foo is considered as non empty but shouldn't. If I pass `[], []` to the method, the final array is empty. As soon as I change the typehint from list to array, the array is correctly inferred as array (and not non-empty-array) https://phpstan.org/r/1b3c3201-730a-488e-988d-8e7ec87bad30 ### Code snippet that reproduces the problem https://phpstan.org/r/3ac09ec1-e62e-42b0-b853-06a1450c238f ### Expected output No error ### Did PHPStan help you today? Did it make you happy in any way? _No response_
Activity
Add regression tests for related dependent type narrowing issues
phpstan-bot commentedon Apr 1, 2026
Closed via merging phpstan/phpstan-src#5373
github-actions commentedon May 3, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.