Bug report
Return type of array_column() may be reported to include never type.
Rows without the expected key are omitted in the result array.
array_column([[]], 'not_exist'); // returns [], but typed as array{*NEVER*}
Code snippet that reproduces the problem
https://phpstan.org/r/b6720366-c731-47de-b493-c6366a18ce57
Expected output
All assertType pass
Did PHPStan help you today? Did it make you happy in any way?
I recently started to use PHPStan on my job, and it helps me a lot!
Bug report
Return type of
array_column()may be reported to include never type.Rows without the expected key are omitted in the result array.
Code snippet that reproduces the problem
https://phpstan.org/r/b6720366-c731-47de-b493-c6366a18ce57
Expected output
All assertType pass
Did PHPStan help you today? Did it make you happy in any way?
I recently started to use PHPStan on my job, and it helps me a lot!