Bug report
Parameter #4 $replacement of array_splice() is reported as array|string, it should be mixed through, see https://www.php.net/manual/en/function.array-splice.php
Code snippet that reproduces the problem
https://phpstan.org/r/47c75bff-cfa4-417c-b4dc-070d23b46d89
Expected output
No error, the code snippet works as expected: https://3v4l.org/aieOR
Did PHPStan help you today? Did it make you happy in any way?
It allowed me to delete around 200 lines of redundant code.