array_slice()
function array_slice(array $array, int $offset, int $length = null, bool $preserve_keys = false): array
Extracts a slice of an array.
Parameters:
$array(array)$offset(int)$length(int), defaultnull, optional$preserve_keys(bool), defaultfalse, optional
Returns: array
Availability
| Compiled (AOT) | Magician (eval) |
|---|---|
| Available | Available |
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how array_slice is implemented in the compiler, see the internals page.