Bug report
When using array_splice, the count of an array is assumed to still be non-zero, although all items may have been consumed by ref.
Code snippet that reproduces the problem
https://phpstan.org/r/ed7751a9-537f-4855-a940-9f63de5d1c10
Expected output
No error, as per https://3v4l.org/YoPBg you can very well see that it is not always false :)
Did PHPStan help you today? Did it make you happy in any way?
Definitely, I found some bugs in my code (and yours;)