3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = range('a', 'g'); $size = 7; var_dump( array_chunk( [...$arr, ...array_fill(0, $size-(count($arr)%$size), null)], $size) );
Output for git.master_jit, git.master
array(2) { [0]=> array(7) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" [4]=> string(1) "e" [5]=> string(1) "f" [6]=> string(1) "g" } [1]=> array(7) { [0]=> NULL [1]=> NULL [2]=> NULL [3]=> NULL [4]=> NULL [5]=> NULL [6]=> NULL } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
54.21 ms | 1018 KiB | 4 Q