Skip to content

Function: array_splice() ​

array_splice<T>(array, offset, length?, ...replacement): T[]

Defined in: src/php-arrays.ts:118

Remove a portion of the array and replace it with something else.

Type Parameters ​

T ​

T

Parameters ​

array ​

T[]

The source array

offset ​

number

The starting offset

length? ​

number

The number of elements to remove

replacement ​

...T[]

The elements to replace with

Returns ​

T[]

The modified array (copy)

Documentation of 1.0.13 , built from cf61d3b on 1.0.13 by pipeline #2985011498 on 2026-10-21.