3v4l.org

run code in 300+ PHP versions simultaneously
<?php //16 $arr = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p"); $limit=7; $count=ceil(count($arr)/$limit); $content = array(); $j=1; for($i=0;$i<$count;$i++) { $content[$i] = array_slice($arr,($i*$limit),($j*$limit)); //ambil array yang pertama dari setiap limit array. $tmpContent= array(); if($content[$i][0]!=$content[$i]) { $tmpContent[$i] = $content[$i]; } $content[$i] = array($content[$i][0],$tmpContent[$i]); //$content[$i][0] = array($content[$i][0]); $j++; } echo "<pre>"; var_dump(array_chunk($arr,7)); echo "</pre>";
Output for git.master, git.master_jit, rfc.property-hooks
<pre>array(3) { [0]=> array(7) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" [4]=> string(1) "e" [5]=> string(1) "f" [6]=> string(1) "g" } [1]=> array(7) { [0]=> string(1) "h" [1]=> string(1) "i" [2]=> string(1) "j" [3]=> string(1) "k" [4]=> string(1) "l" [5]=> string(1) "m" [6]=> string(1) "n" } [2]=> array(2) { [0]=> string(1) "o" [1]=> string(1) "p" } } </pre>

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:
54.91 ms | 402 KiB | 8 Q