2 /* Prototype : proto array array_chunk(array $array, int $size [, bool $preserve_keys])
3 * Description: Split array into chunks
4 * Chunks an array into size large chunks.
5 * Source code: ext/standard/array.c
9 * Testing array_chunk() function with unexpected values for 'array' argument
11 <<__EntryPoint
>> function main(): void
{
12 echo "*** Testing array_chunk() : usage variations ***\n";
14 // Initialise function arguments
17 //get an unset variable
21 //array of values to iterate over
56 /*20*/ new stdclass(),
61 // loop through each element of the array for input
62 foreach($values as $value){
63 echo "\n-- Iteration $count --\n";
64 var_dump( array_chunk($value, $size) );
65 var_dump( array_chunk($value, $size, true) );
66 var_dump( array_chunk($value, $size, false) );