3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input_array = array(1, 2); print_r(array_chunk($input_array, 1)); print_r(array_chunk($input_array, 1, true));
based on o4FqU
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
Array ( [0] => Array ( [0] => 1 ) [1] => Array ( [0] => 2 ) ) Array ( [0] => Array ( [0] => 1 ) [1] => Array ( [1] => 2 ) )