3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo(&$a) {$a[1] = 1;return $a;}; $b = array_fill(1, 600, 'banana'); print_r(foo($b));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [1] => 1 [2] => banana [3] => banana [4] => banana [5] => banana [6] => banana [7] => banana [8] => banana [9] => banana [10] => banana [11] => banana [12] => banana [13] => banana [14] => banana [15] => banana [16] => banana [17] => banana [18] => banana [19] => banana [20] => banana [21] => banana [22] => banana [23] => banana [24] => banana [25] => banana [26] => banana [27] => banana [28] => banana [29] => banana [30] => banana [31] => banana [32] => banana [33] => banana [34] => banana [35] => banana [36] => banana [37] => banana [38] => banana [39] => banana [40] => banana [41] => banana [42] => banana [43] => banana [44] => banana [45] => banana [46] => banana [47] => banana [48] => banana [49] => banana [50] => banana [51] => banana [52] => banana [53] => banana [54] => banana [55] => banana [56] => banana [57] => banana [58] => banana [59] => banana [60] => banana [61] => banana [62] => banana [63] => banana [64] => banana [65] => banana [66] => banana [67] => banana [68] => banana [69] => banana [70] => banana [71] => banana [72] => banana [73] => banana [74] => banana [75] => banana [76] => banana [77] => banana [78] => banana [79] => banana [80] => banana [81] => banana [82] => banana [83] => banana [84] => banana [85] => banana [86] => banana [87] => banana [88] => banana [89] => banana [90] => banana [91] => banana [92] => banana [93] => banana [94] => banana [95] => banana [96] => banana [97] => banana [98] => banana [99] => banana [100] => banana [101] => banana [102] => banana [103] => banana [104] => banana [105] => banana [106] => banana [107] => banana [108] => banana [109] => banana [110] => banana [111] => banana [112] => banana [113] => banana [114] => banana [115] => banana [116] => banana [117] => banana [118] => banana [119] => banana [120] => banana [121] => banana [122] => banana [123] => banana [124] => banana [125] => banana [126] => banana [127] => banana [128] => banana [129] => banana [130] => banana [131] => banana [132] => banana [133] => banana [134] => banana [135] => banana [136] => banana [137] => banana [138] => banana [139] => banana [140] => banana [141] => banana [142] => banana [143] => banana [144] => banana [145] => banana [146] => banana [147] => banana [148] => banana [149] => banana [150] => banana [151] => banana [152] => banana [153] => banana [154] => banana [155] => banana [156] => banana [157] => banana [158] => banana [159] => banana [160] => banana [161] => banana [162] => banana [163] => banana [164] => banana [165] => banana [166] => banana [167] => banana [168] => banana [169] => banana [170] => banana [171] => banana [172] => banana [173] => banana [174] => banana [175] => banana [176] => banana [177] => banana [178] => banana [179] => banana [180] => banana [181] => banana [182] => banana [183] => banana [184] => banana [185] => banana [186] => banana [187] => banana [188] => banana [189] => banana [190] => banana [191] => banana [192] => banana [193] => banana [194] => banana [195] => banana [196] => banana [197] => banana [198] => banana [199] => banana [200] => banana [201] => banana [202] => banana [203] => banana [204] => banana [205] => banana [206] => banana [207] => banana [208] => banana [209] => banana [210] => banana [211] => banana [212] => banana [213] => banana [214] => banana [215] => banana [216] => banana [217] => banana [218] => banana [219] => banana [220] => banana [221] => banana [222] => banana [223] => banana [224] => banana [225] => banana [226] => banana [227] => banana [228] => banana [229] => banana [230] => banana [231] => banana [232] => banana [233] => banana [234] => banana [235] => banana [236] => banana [237] => banana [238] => banana [239] => banana [240] => banana [241] => banana [242] => banana [243] => banana [244] => banana [245] => banana [246] => banana [247] => banana [248] => banana [249] => banana [250] => banana [251] => banana [252] => banana [253] => banana [254] => banana [255] => banana [256] => banana [257] => banana [258] => banana [259] => banana [260] => banana [261] => banana [262] => banana [263] => banana [264] => banana [265] => banana [266] => banana [267] => banana [268] => banana [269] => banana [270] => banana [271] => banana [272] => banana [273] => banana [274] => banana [275] => banana [276] => banana [277] => banana [278] => banana [279] => banana [280] => banana [281] => banana [282] => banana [283] => banana [284] => banana [285] => banana [286] => banana [287] => banana [288] => banana [289] => banana [290] => banana [291] => banana [292] => banana [293] => banana [294] => banana [295] => banana [296] => banana [297] => banana [298] => banana [299] => banana [300] => banana [301] => banana [302] => banana [303] => banana [304] => banana [305] => banana [306] => banana [307] => banana [308] => banana [309] => banana [310] => banana [311] => banana [312] => banana [313] => banana [314] => banana [315] => banana [316] => banana [317] => banana [318] => banana [319] => banana [320] => banana [321] => banana [322] => banana [323] => banana [324] => banana [325] => banana [326] => banana [327] => banana [328] => banana [329] => banana [330] => banana [331] => banana [332] => banana [333] => banana [334] => banana [335] => banana [336] => banana [337] => banana [338] => banana [339] => banana [340] => banana [341] => banana [342] => banana [343] => banana [344] => banana [345] => banana [346] => banana [347] => banana [348] => banana [349] => banana [350] => banana [351] => banana [352] => banana [353] => banana [354] => banana [355] => banana [356] => banana [357] => banana [358] => banana [359] => banana [360] => banana [361] => banana [362] => banana [363] => banana [364] => banana [365] => banana [366] => banana [367] => banana [368] => banana [369] => banana [370] => banana [371] => banana [372] => banana [373] => banana [374] => banana [375] => banana [376] => banana [377] => banana [378] => banana [379] => banana [380] => banana [381] => banana [382] => banana [383] => banana [384] => banana [385] => banana [386] => banana [387] => banana [388] => banana [389] => banana [390] => banana [391] => banana [392] => banana [393] => banana [394] => banana [395] => banana [396] => banana [397] => banana [398] => banana [399] => banana [400] => banana [401] => banana [402] => banana [403] => banana [404] => banana [405] => banana [406] => banana [407] => banana [408] => banana [409] => banana [410] => banana [411] => banana [412] => banana [413] => banana [414] => banana [415] => banana [416] => banana [417] => banana [418] => banana [419] => banana [420] => banana [421] => banana [422] => banana [423] => banana [424] => banana [425] => banana [426] => banana [427] => banana [428] => banana [429] => banana [430] => banana [431] => banana [432] => banana [433] => banana [434] => banana [435] => banana [436] => banana [437] => banana [438] => banana [439] => banana [440] => banana [441] => banana [442] => banana [443] => banana [444] => banana [445] => banana [446] => banana [447] => banana [448] => banana [449] => banana [450] => banana [451] => banana [452] => banana [453] => banana [454] => banana [455] => banana [456] => banana [457] => banana [458] => banana [459] => banana [460] => banana [461] => banana [462] => banana [463] => banana [464] => banana [465] => banana [466] => banana [467] => banana [468] => banana [469] => banana [470] => banana [471] => banana [472] => banana [473] => banana [474] => banana [475] => banana [476] => banana [477] => banana [478] => banana [479] => banana [480] => banana [481] => banana [482] => banana [483] => banana [484] => banana [485] => banana [486] => banana [487] => banana [488] => banana [489] => banana [490] => banana [491] => banana [492] => banana [493] => banana [494] => banana [495] => banana [496] => banana [497] => banana [498] => banana [499] => banana [500] => banana [501] => banana [502] => banana [503] => banana [504] => banana [505] => banana [506] => banana [507] => banana [508] => banana [509] => banana [510] => banana [511] => banana [512] => banana [513] => banana [514] => banana [515] => banana [516] => banana [517] => banana [518] => banana [519] => banana [520] => banana [521] => banana [522] => banana [523] => banana [524] => banana [525] => banana [526] => banana [527] => banana [528] => banana [529] => banana [530] => banana [531] => banana [532] => banana [533] => banana [534] => banana [535] => banana [536] => banana [537] => banana [538] => banana [539] => banana [540] => banana [541] => banana [542] => banana [543] => banana [544] => banana [545] => banana [546] => banana [547] => banana [548] => banana [549] => banana [550] => banana [551] => banana [552] => banana [553] => banana [554] => banana [555] => banana [556] => banana [557] => banana [558] => banana [559] => banana [560] => banana [561] => banana [562] => banana [563] => banana [564] => banana [565] => banana [566] => banana [567] => banana [568] => banana [569] => banana [570] => banana [571] => banana [572] => banana [573] => banana [574] => banana [575] => banana [576] => banana [577] => banana [578] => banana [579] => banana [580] => banana [581] => banana [582] => banana [583] => banana [584] => banana [585] => banana [586] => banana [587] => banana [588] => banana [589] => banana [590] => banana [591] => banana [592] => banana [593] => banana [594] => banana [595] => banana [596] => banana [597] => banana [598] => banana [599] => banana [600] => banana )