array_chunk()
function array_chunk(array $array, int $length, bool $preserve_keys = false): array
Splits an array into chunks of the given size.
Parameters:
$array(array)$length(int)$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_chunk is implemented in the compiler, see the internals page.