Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Remove a portion of the array and replace it with something else
array_splice(    array &$array,    int $offset,    ?int $length null,    mixed $replacement = []): array
    public function splice($offset$length null$replacement = [])

    {

        if (
func_num_args() === 1) {

            return new static(
array_splice($this->items$offset));

        }



        return new static(
array_splice($this->items$offset$length$this->getArrayableItems($replacement)));
            return new static(array_splice($this->items$offset));

        }



        return new static(
array_splice($this->items$offset$length$this->getArrayableItems($replacement)));

    }
    {

        
$row array_values(Arr::except($failed, ['payload''exception']));



        
array_splice($row30$this->extractJobName($failed['payload']) ?: '');



        return 
$row;

    }
    protected function spliceIntoParameters(array &$parameters$offset$value)

    {

        
array_splice(

            
$parameters$offset0, [$value]

        );

    }

}
    protected function moveMiddleware($middlewares$from$to)

    {

        
array_splice($middlewares$to0$middlewares[$from]);



        unset(
$middlewares[$from 1]);