Function __global->array_splice
Definitions
sources_custom/phpstub.php
- Remove a portion of the array and replace it with something else.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| &$input | array | Yes | No | required parameter | N/A | N/A | The array |
| $offset | integer | No | No | required parameter | N/A | N/A | The offset |
| $length | ?integer | No | No | Null | N/A | N/A | The length (null: up to the end of the array) |
| $replacement | ?array | No | No | Null | N/A | N/A | The replacement (null: nothing put in, just bit taken out) |
Returns
- The spliced result
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Remove a portion of the array and replace it with something else.
*
* @param array $input The array
* @param integer $offset The offset
* @param ?integer $length The length (null: up to the end of the array)
* @param ?array $replacement The replacement (null: nothing put in, just bit taken out)
* @return array The spliced result
*/
function array_splice(array &$input, int $offset, ?int $length = null, ?array $replacement = null) : array
* Remove a portion of the array and replace it with something else.
*
* @param array $input The array
* @param integer $offset The offset
* @param ?integer $length The length (null: up to the end of the array)
* @param ?array $replacement The replacement (null: nothing put in, just bit taken out)
* @return array The spliced result
*/
function array_splice(array &$input, int $offset, ?int $length = null, ?array $replacement = null) : array

