3v4l.org

run code in 300+ PHP versions simultaneously
<?php $campaignIds = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17); $limit=3; $blocksCount = ceil(count($campaignIds) / $limit); for ($i = 0; $i < $blocksCount; $i++) {echo ($limit * $i) .PHP_EOL; print_r((array_slice($campaignIds, $limit * $i, $limit))); }
Output for git.master, git.master_jit, rfc.property-hooks
0 Array ( [0] => 1 [1] => 2 [2] => 3 ) 3 Array ( [0] => 4 [1] => 5 [2] => 6 ) 6 Array ( [0] => 7 [1] => 8 [2] => 9 ) 9 Array ( [0] => 10 [1] => 11 [2] => 12 ) 12 Array ( [0] => 13 [1] => 14 [2] => 15 ) 15 Array ( [0] => 16 [1] => 17 )

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:
41.97 ms | 401 KiB | 8 Q