3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ 2 => [130, 28, 1, 1, 6], 3 => [52, 2, 3, 3, 27], 13 => [41, 20, 27, 13, 37] ]; $array2 = [89, 99, 109]; $counter = 0; foreach ($array1 as $index => $subArray) { $array1[$index][] = $array2[$counter++]; } print_r($array1);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [2] => Array ( [0] => 130 [1] => 28 [2] => 1 [3] => 1 [4] => 6 [5] => 89 ) [3] => Array ( [0] => 52 [1] => 2 [2] => 3 [3] => 3 [4] => 27 [5] => 99 ) [13] => Array ( [0] => 41 [1] => 20 [2] => 27 [3] => 13 [4] => 37 [5] => 109 ) )

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:
103.58 ms | 407 KiB | 5 Q