3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $seqnums = array(); for ($snum=1; $snum<=48; $snum++) { $seqnums = array_merge($seqnums,array_fill(1,3,$snum)); } print_r($seqnums);
Output for 4.3.0 - 7.1.0
Array ( [0] => 1 [1] => 1 [2] => 1 [3] => 2 [4] => 2 [5] => 2 [6] => 3 [7] => 3 [8] => 3 [9] => 4 [10] => 4 [11] => 4 [12] => 5 [13] => 5 [14] => 5 [15] => 6 [16] => 6 [17] => 6 [18] => 7 [19] => 7 [20] => 7 [21] => 8 [22] => 8 [23] => 8 [24] => 9 [25] => 9 [26] => 9 [27] => 10 [28] => 10 [29] => 10 [30] => 11 [31] => 11 [32] => 11 [33] => 12 [34] => 12 [35] => 12 [36] => 13 [37] => 13 [38] => 13 [39] => 14 [40] => 14 [41] => 14 [42] => 15 [43] => 15 [44] => 15 [45] => 16 [46] => 16 [47] => 16 [48] => 17 [49] => 17 [50] => 17 [51] => 18 [52] => 18 [53] => 18 [54] => 19 [55] => 19 [56] => 19 [57] => 20 [58] => 20 [59] => 20 [60] => 21 [61] => 21 [62] => 21 [63] => 22 [64] => 22 [65] => 22 [66] => 23 [67] => 23 [68] => 23 [69] => 24 [70] => 24 [71] => 24 [72] => 25 [73] => 25 [74] => 25 [75] => 26 [76] => 26 [77] => 26 [78] => 27 [79] => 27 [80] => 27 [81] => 28 [82] => 28 [83] => 28 [84] => 29 [85] => 29 [86] => 29 [87] => 30 [88] => 30 [89] => 30 [90] => 31 [91] => 31 [92] => 31 [93] => 32 [94] => 32 [95] => 32 [96] => 33 [97] => 33 [98] => 33 [99] => 34 [100] => 34 [101] => 34 [102] => 35 [103] => 35 [104] => 35 [105] => 36 [106] => 36 [107] => 36 [108] => 37 [109] => 37 [110] => 37 [111] => 38 [112] => 38 [113] => 38 [114] => 39 [115] => 39 [116] => 39 [117] => 40 [118] => 40 [119] => 40 [120] => 41 [121] => 41 [122] => 41 [123] => 42 [124] => 42 [125] => 42 [126] => 43 [127] => 43 [128] => 43 [129] => 44 [130] => 44 [131] => 44 [132] => 45 [133] => 45 [134] => 45 [135] => 46 [136] => 46 [137] => 46 [138] => 47 [139] => 47 [140] => 47 [141] => 48 [142] => 48 [143] => 48 )