Function __global->array_unshift
Definitions
sources_custom/phpstub.php
- Prepend one or more elements to the beginning of array.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| &$array | array | Yes | No | required parameter | N/A | N/A | Array to prepend to |
| ...$vars | mixed | No | Yes | required parameter | N/A | N/A | ...$vars Elements to prepend |
Returns
- The new number of elements in the array
- Type: integer
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Prepend one or more elements to the beginning of array.
*
* @param array $array Array to prepend to
* @param mixed $vars ...$vars Elements to prepend
* @return integer The new number of elements in the array
*/
function array_unshift(array &$array, ...$vars) : int
* Prepend one or more elements to the beginning of array.
*
* @param array $array Array to prepend to
* @param mixed $vars ...$vars Elements to prepend
* @return integer The new number of elements in the array
*/
function array_unshift(array &$array, ...$vars) : int

