3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = range('a', 'g'); $n = 2; $result = array_chunk($array, $n); $result[array_key_last($result)] += array_fill(0, $n, null); var_export($result);
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:
59.62 ms | 1001 KiB | 4 Q