3v4l.org

run code in 300+ PHP versions simultaneously
<?php $abc = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; $cols = []; $perCol = 7; foreach($abc as $index => $val) { $colInd = $index / $perCol; $cols[$colInd][] = $val; } print_r($cols);
Output for rfc.property-hooks, git.master, git.master_jit
Deprecated: Implicit conversion from float 0.14285714285714285 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 0.2857142857142857 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 0.42857142857142855 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 0.5714285714285714 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 0.7142857142857143 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 0.8571428571428571 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 1.1428571428571428 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 1.2857142857142858 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 1.4285714285714286 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 1.5714285714285714 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 1.7142857142857142 to int loses precision in /in/EZjjH on line 8 Deprecated: Implicit conversion from float 1.8571428571428572 to int loses precision in /in/EZjjH on line 8 Array ( [0] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 ) [1] => Array ( [0] => 8 [1] => 9 [2] => 10 [3] => 11 [4] => 12 [5] => 13 [6] => 14 ) [2] => Array ( [0] => 15 ) )

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:
44.08 ms | 1947 KiB | 4 Q