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);echo $blocksCount.PHP_EOL; for ($i = 0; $i < $blocksCount; $i++) {echo $i.' - '. $blocksCount * $i .PHP_EOL; print_r((array_slice($campaignIds, $blocksCount * $i, $limit))); }
Output for git.master, git.master_jit, rfc.property-hooks
6 0 - 0 Array ( [0] => 1 [1] => 2 [2] => 3 ) 1 - 6 Array ( [0] => 7 [1] => 8 [2] => 9 ) 2 - 12 Array ( [0] => 13 [1] => 14 [2] => 15 ) 3 - 18 Array ( ) 4 - 24 Array ( ) 5 - 30 Array ( )

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.15 ms | 401 KiB | 8 Q