3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = range('a', 'g'); $n = 2; var_export( array_chunk(array_pad($array, $n * ceil(count($array) / $n), null), $n) );
Output for git.master, git.master_jit
array ( 0 => array ( 0 => 'a', 1 => 'b', ), 1 => array ( 0 => 'c', 1 => 'd', ), 2 => array ( 0 => 'e', 1 => 'f', ), 3 => array ( 0 => 'g', 1 => 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:
43.98 ms | 1001 KiB | 4 Q