Bug report
array rand returns a valid index for the given array, as long as the array is non-empty
Code snippet that reproduces the problem
https://phpstan.org/r/2c6b246b-0f5b-461d-8dfb-1916dace03aa
Expected output
no errors
Did PHPStan help you today? Did it make you happy in any way?
No response