-
-
Notifications
You must be signed in to change notification settings - Fork 938
Open
phpstan/phpstan-src
#4844Description
Bug report
array_splice resets the key of the input array when the keys are integer.
https://3v4l.org/R0a2I
PHPStan infers the correct type on constant arrays, but not for general arrays like array<10|20|30, mixed>.
Code snippet that reproduces the problem
https://phpstan.org/r/4753d549-20a2-4c81-85e8-2d821cf9a41f
Expected output
No error on assertType
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels