A::slice()
Returns a slice of an array
A::slice(array $array, int $offset, int|null $length = null, bool $preserveKeys = false): array
Parameters
| Name | Type | Default |
|---|---|---|
| $arrayrequired | array |
no default value |
| $offsetrequired | int |
no default value |
| $length | intornull |
null
|
| $preserveKeys | bool |
false
|
Return type
array