Skip to content

Parameter #4 $replacement of function array_splice expects array|string #6288

@spawnia

Description

@spawnia

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions