3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = range('a', 'g'); $n = 2; var_export( array_map(fn($chunk) => array_pad($chunk, $n, null), array_chunk($array, $n)) );
Output for git.master_jit, git.master
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:
40.2 ms | 1002 KiB | 4 Q