3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr=[1,2,3,4,6,7,8,10,11,12,13,14,16,17,18]; $block = array_chunk($arr,3); print_r($block); $blockNew[] = array_slice($arr, 0, 3, true); $blockNew[] = array_slice($arr, 4, 3, true); $blockNew[] = array_slice($arr, 7, 3, true); print_r($blockNew);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => 1 [1] => 2 [2] => 3 ) [1] => Array ( [0] => 4 [1] => 6 [2] => 7 ) [2] => Array ( [0] => 8 [1] => 10 [2] => 11 ) [3] => Array ( [0] => 12 [1] => 13 [2] => 14 ) [4] => Array ( [0] => 16 [1] => 17 [2] => 18 ) ) Array ( [0] => Array ( [0] => 1 [1] => 2 [2] => 3 ) [1] => Array ( [4] => 6 [5] => 7 [6] => 8 ) [2] => Array ( [7] => 10 [8] => 11 [9] => 12 ) )

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:
60.19 ms | 1847 KiB | 4 Q