3v4l.org

run code in 300+ PHP versions simultaneously
<?php $IDs = Array ( 0 => 86456, 1 => 83981, 2 => 3444, 3 => 2296, 4 => 21515, 5 => 66707, 6 => 20507, 7 => 66985, 8 => 78067, 9 => 10364 ); $number_of_seasons = Array ( 0 => 1, 1 => 1, 2 => 1, 3 => 1, 4 => 1, 5 => 3, 6 => 3, 7 => 1, 8 => 1, 9 => 1 ); $finalArray = []; foreach($IDs as $key=>$id){ $finalArray = array_merge($finalArray, array_fill (0, $number_of_seasons[$key], $id)); } print_r($finalArray);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 86456 [1] => 83981 [2] => 3444 [3] => 2296 [4] => 21515 [5] => 66707 [6] => 66707 [7] => 66707 [8] => 20507 [9] => 20507 [10] => 20507 [11] => 66985 [12] => 78067 [13] => 10364 )

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:
68.59 ms | 406 KiB | 5 Q