3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $iter = 100; $array = range(0, $iter); $function = function($val, $key) {}; $t = microtime(true); for($i = 0; $i < $iter; $i++) { array_walk($array, $function); } echo 'array_walk '.($walk = microtime(true) - $t); $t = microtime(true); for($i = 0; $i < $iter; $i++) { array_map($function, $array, array_keys($array)); } echo ', array_map '.($map = microtime(true) - $t); echo ', '.($walk / $map * 100).'%';
Output for 7.1.0
array_walk 0.00048208236694336, array_map 0.0005040168762207, 95.648060548723%
Output for 7.0.14
array_walk 0.00075101852416992, array_map 0.00083518028259277, 89.922923208678%
Output for 7.0.10
array_walk 0.00065398216247559, array_map 0.00072002410888672, 90.827814569536%
Output for 7.0.9
array_walk 0.00056099891662598, array_map 0.00062298774719238, 90.049751243781%
Output for 7.0.8
array_walk 0.00062203407287598, array_map 0.00050520896911621, 123.12411514866%
Output for 7.0.7
array_walk 0.0004429817199707, array_map 0.00050497055053711, 87.724268177526%
Output for 7.0.6
array_walk 0.00059890747070312, array_map 0.00070691108703613, 84.721753794266%
Output for 7.0.5
array_walk 0.00088191032409668, array_map 0.00099420547485352, 88.705035971223%
Output for 7.0.4
array_walk 0.00097012519836426, array_map 0.0011630058288574, 83.415334153342%
Output for 7.0.3
array_walk 0.00099301338195801, array_map 0.0011861324310303, 83.718592964824%
Output for 7.0.2
array_walk 0.0011019706726074, array_map 0.0011720657348633, 94.019528071603%
Output for 7.0.1
array_walk 0.00077009201049805, array_map 0.00087499618530273, 88.010899182561%
Output for 7.0.0
array_walk 0.0011909008026123, array_map 0.0013267993927002, 89.757412398922%
Output for hhvm-3.12.0
array_walk 0.0014569759368896, array_map 0.0031800270080566, 45.816464237517%
Output for hhvm-3.10.0
array_walk 0.0016801357269287, array_map 0.002518892288208, 66.701372456223%
Output for 5.6.28
array_walk 0.0024170875549316, array_map 0.003777027130127, 63.994445145815%
Output for 5.6.25
array_walk 0.0019409656524658, array_map 0.0032281875610352, 60.125553914328%
Output for 5.6.24
array_walk 0.0019421577453613, array_map 0.0030660629272461, 63.343701399689%
Output for 5.6.23
array_walk 0.0015468597412109, array_map 0.0023880004882812, 64.776357827476%
Output for 5.6.22
array_walk 0.0029761791229248, array_map 0.0047609806060791, 62.511893434824%
Output for 5.6.21
array_walk 0.0022351741790771, array_map 0.0033700466156006, 66.3247258578%
Output for 5.6.20
array_walk 0.0023889541625977, array_map 0.0028929710388184, 82.577880336245%
Output for 5.6.19
array_walk 0.0021860599517822, array_map 0.0035738945007324, 61.167444963309%
Output for 5.6.18
array_walk 0.0014700889587402, array_map 0.0025429725646973, 57.809863116445%
Output for 5.6.17
array_walk 0.0022568702697754, array_map 0.0035359859466553, 63.825770345897%
Output for 5.6.16
array_walk 0.0013968944549561, array_map 0.0023047924041748, 60.608254887762%
Output for 5.6.15
array_walk 0.0019149780273438, array_map 0.002662181854248, 71.932652695683%
Output for 5.6.14
array_walk 0.0027220249176025, array_map 0.0036530494689941, 74.513771048166%
Output for 5.6.13
array_walk 0.0023329257965088, array_map 0.0034849643707275, 66.942601080933%
Output for 5.6.12
array_walk 0.0016319751739502, array_map 0.0024979114532471, 65.33358785912%
Output for 5.6.11
array_walk 0.0016450881958008, array_map 0.002579927444458, 63.764901580261%
Output for 5.6.10
array_walk 0.0013577938079834, array_map 0.0021569728851318, 62.94904388195%
Output for 5.6.9
array_walk 0.0016179084777832, array_map 0.002471923828125, 65.451388888889%
Output for 5.6.8
array_walk 0.0043759346008301, array_map 0.006803035736084, 64.323263475152%
Output for 5.6.7
array_walk 0.0020759105682373, array_map 0.0031781196594238, 65.318829707427%
Output for 5.6.6
array_walk 0.0019030570983887, array_map 0.0030720233917236, 61.948001552192%
Output for 5.6.5
array_walk 0.0023419857025146, array_map 0.0037839412689209, 61.892760380568%
Output for 5.6.4
array_walk 0.001924991607666, array_map 0.0033118724822998, 58.123965157296%
Output for 5.6.3
array_walk 0.0021519660949707, array_map 0.0033230781555176, 64.75821495193%
Output for 5.6.2
array_walk 0.0020208358764648, array_map 0.0031659603118896, 63.830107688832%
Output for 5.6.1
array_walk 0.0019371509552002, array_map 0.0027551651000977, 70.309795777085%
Output for 5.6.0
array_walk 0.0020039081573486, array_map 0.0031061172485352, 64.514891003991%
Output for 5.5.38
array_walk 0.0029149055480957, array_map 0.0032408237457275, 89.943353196498%
Output for 5.5.37
array_walk 0.001924991607666, array_map 0.0030391216278076, 63.340393818153%
Output for 5.5.36
array_walk 0.0019748210906982, array_map 0.0032041072845459, 61.634050152541%
Output for 5.5.35
array_walk 0.0022861957550049, array_map 0.0035290718078613, 64.781786245102%
Output for 5.5.34
array_walk 0.0019440650939941, array_map 0.003169059753418, 61.345170027084%
Output for 5.5.33
array_walk 0.0018711090087891, array_map 0.0030670166015625, 61.007462686567%
Output for 5.5.32
array_walk 0.0015220642089844, array_map 0.0024230480194092, 62.816097608974%
Output for 5.5.31
array_walk 0.0022659301757812, array_map 0.0035951137542725, 63.028052258107%
Output for 5.5.30
array_walk 0.0023469924926758, array_map 0.0034868717193604, 67.309401709402%
Output for 5.5.29
array_walk 0.0014269351959229, array_map 0.002161979675293, 66.001323334804%
Output for 5.5.28
array_walk 0.0020768642425537, array_map 0.0032768249511719, 63.380384167637%
Output for 5.5.27
array_walk 0.0018479824066162, array_map 0.0031771659851074, 58.164490469758%
Output for 5.5.26
array_walk 0.0018541812896729, array_map 0.0028879642486572, 64.203748039297%
Output for 5.5.25
array_walk 0.0015740394592285, array_map 0.0026991367340088, 58.316403144599%
Output for 5.5.24
array_walk 0.0015239715576172, array_map 0.0025858879089355, 58.934169278997%
Output for 5.5.23
array_walk 0.002216100692749, array_map 0.0034999847412109, 63.317438692098%
Output for 5.5.22
array_walk 0.001957893371582, array_map 0.0031280517578125, 62.591463414634%
Output for 5.5.21
array_walk 0.0018939971923828, array_map 0.0030441284179688, 62.218045112782%
Output for 5.5.20
array_walk 0.0017781257629395, array_map 0.0028090476989746, 63.29994907486%
Output for 5.5.19
array_walk 0.0017659664154053, array_map 0.0028328895568848, 62.337990237334%
Output for 5.5.18
array_walk 0.0014839172363281, array_map 0.0033230781555176, 44.654900272636%
Output for 5.5.16
array_walk 0.0021770000457764, array_map 0.003328800201416, 65.398939979946%
Output for 5.5.15
array_walk 0.0013911724090576, array_map 0.0021800994873047, 63.812335958005%
Output for 5.5.14
array_walk 0.0017211437225342, array_map 0.0027070045471191, 63.581116787035%
Output for 5.5.13
array_walk 0.0019960403442383, array_map 0.003201961517334, 62.338049143708%
Output for 5.5.12
array_walk 0.0022330284118652, array_map 0.0027179718017578, 82.157894736842%
Output for 5.5.11
array_walk 0.0020990371704102, array_map 0.0032789707183838, 64.015123972951%
Output for 5.5.10
array_walk 0.0026969909667969, array_map 0.0030617713928223, 88.08596791777%
Output for 5.5.9
array_walk 0.0020601749420166, array_map 0.0031919479370117, 64.542874215716%
Output for 5.5.8
array_walk 0.0016701221466064, array_map 0.0026428699493408, 63.19350473613%
Output for 5.5.7
array_walk 0.0015850067138672, array_map 0.0023369789123535, 67.822893287084%
Output for 5.5.6
array_walk 0.0018610954284668, array_map 0.0029160976409912, 63.821437331371%
Output for 5.5.5
array_walk 0.0020520687103271, array_map 0.0033481121063232, 61.290322580645%
Output for 5.5.4
array_walk 0.0016601085662842, array_map 0.0025970935821533, 63.921784632333%
Output for 5.5.3
array_walk 0.0022091865539551, array_map 0.0037200450897217, 59.386015509838%
Output for 5.5.2
array_walk 0.0018661022186279, array_map 0.0032608509063721, 57.227462162755%
Output for 5.5.1
array_walk 0.0020129680633545, array_map 0.0032591819763184, 61.762984637893%
Output for 5.5.0
array_walk 0.0023288726806641, array_map 0.0036439895629883, 63.909971211725%
Output for 5.4.45
array_walk 0.0021519660949707, array_map 0.0032479763031006, 66.255597151876%
Output for 5.4.44
array_walk 0.0016310214996338, array_map 0.0025589466094971, 63.738004285847%
Output for 5.4.43
array_walk 0.0020549297332764, array_map 0.00400710105896, 51.282203843637%
Output for 5.4.42
array_walk 0.0017619132995605, array_map 0.0027229785919189, 64.70536730584%
Output for 5.4.41
array_walk 0.0020861625671387, array_map 0.0031888484954834, 65.420560747664%
Output for 5.4.40
array_walk 0.0021548271179199, array_map 0.0034308433532715, 62.807505211953%
Output for 5.4.39
array_walk 0.0024170875549316, array_map 0.0026748180389404, 90.364560121223%
Output for 5.4.38
array_walk 0.0022108554840088, array_map 0.0035109519958496, 62.97025668885%
Output for 5.4.37
array_walk 0.0021228790283203, array_map 0.0032308101654053, 65.707327872482%
Output for 5.4.36
array_walk 0.0017871856689453, array_map 0.0042688846588135, 41.865400726054%
Output for 5.4.35
array_walk 0.0027191638946533, array_map 0.0042788982391357, 63.548225330139%
Output for 5.4.34
array_walk 0.0020232200622559, array_map 0.0034170150756836, 59.210159084566%
Output for 5.4.32
array_walk 0.0029292106628418, array_map 0.0031638145446777, 92.584777694047%
Output for 5.4.31
array_walk 0.0021159648895264, array_map 0.0035040378570557, 60.386473429952%
Output for 5.4.30
array_walk 0.0029618740081787, array_map 0.0025701522827148, 115.24118738404%
Output for 5.4.29
array_walk 0.00189208984375, array_map 0.0029058456420898, 65.113226124056%
Output for 5.4.28
array_walk 0.0021848678588867, array_map 0.0034539699554443, 63.256712915027%
Output for 5.4.27
array_walk 0.0017211437225342, array_map 0.0036690235137939, 46.910130612775%
Output for 5.4.26
array_walk 0.0022330284118652, array_map 0.0034158229827881, 65.373071822433%
Output for 5.4.25
array_walk 0.0024189949035645, array_map 0.0037438869476318, 64.611857606827%
Output for 5.4.24
array_walk 0.0022110939025879, array_map 0.0032310485839844, 68.432703659976%
Output for 5.4.23
array_walk 0.0023059844970703, array_map 0.0030090808868408, 76.634181126694%
Output for 5.4.22
array_walk 0.0017118453979492, array_map 0.0036289691925049, 47.171670718087%
Output for 5.4.21
array_walk 0.0023410320281982, array_map 0.0029120445251465, 80.391354183724%
Output for 5.4.20
array_walk 0.0013489723205566, array_map 0.0022029876708984, 61.233766233766%
Output for 5.4.19
array_walk 0.0022587776184082, array_map 0.0036530494689941, 61.832658921812%
Output for 5.4.18
array_walk 0.0023159980773926, array_map 0.0039379596710205, 58.812132953926%
Output for 5.4.17
array_walk 0.0022830963134766, array_map 0.0036680698394775, 62.242443938902%
Output for 5.4.16
array_walk 0.0013279914855957, array_map 0.0020730495452881, 64.059804485336%
Output for 5.4.15
array_walk 0.0021848678588867, array_map 0.0034308433532715, 63.683113273106%
Output for 5.4.14
array_walk 0.0020251274108887, array_map 0.0032010078430176, 63.265306122449%
Output for 5.4.13
array_walk 0.0022640228271484, array_map 0.0034370422363281, 65.871254162042%
Output for 5.4.12
array_walk 0.002061128616333, array_map 0.0031130313873291, 66.209695948533%
Output for 5.4.11
array_walk 0.0021510124206543, array_map 0.0032839775085449, 65.500217801655%
Output for 5.4.10
array_walk 0.001943826675415, array_map 0.003183126449585, 61.066586772526%
Output for 5.4.9
array_walk 0.0019059181213379, array_map 0.002985954284668, 63.829447460875%
Output for 5.4.8
array_walk 0.0028538703918457, array_map 0.003741979598999, 76.266326855687%
Output for 5.4.7
array_walk 0.0022990703582764, array_map 0.0038080215454102, 60.374405209116%
Output for 5.4.6
array_walk 0.0017328262329102, array_map 0.0034339427947998, 50.461709366104%
Output for 5.4.5
array_walk 0.0014169216156006, array_map 0.0020301342010498, 69.794480328831%
Output for 5.4.4
array_walk 0.0022468566894531, array_map 0.0033090114593506, 67.901145615678%
Output for 5.4.3
array_walk 0.0013120174407959, array_map 0.0020987987518311, 62.512779734182%
Output for 5.4.2
array_walk 0.0023488998413086, array_map 0.003687858581543, 63.692785104732%
Output for 5.4.1
array_walk 0.0022521018981934, array_map 0.0036630630493164, 61.481385055975%
Output for 5.4.0
array_walk 0.0022571086883545, array_map 0.0034980773925781, 64.524263904035%
Output for 5.3.29
array_walk 0.0021119117736816, array_map 0.0032100677490234, 65.790255496138%
Output for 5.3.28
array_walk 0.00211501121521, array_map 0.0032598972320557, 64.879689899803%
Output for 5.3.27
array_walk 0.0023338794708252, array_map 0.0036749839782715, 63.507201245621%
Output for 5.3.26
array_walk 0.0024120807647705, array_map 0.0034809112548828, 69.294520547945%
Output for 5.3.25
array_walk 0.0021970272064209, array_map 0.0034041404724121, 64.539851519821%
Output for 5.3.24
array_walk 0.0025379657745361, array_map 0.003715991973877, 68.298472988579%
Output for 5.3.23
array_walk 0.0023419857025146, array_map 0.003342866897583, 70.059196918907%
Output for 5.3.22
array_walk 0.0017800331115723, array_map 0.0034101009368896, 52.198839404321%
Output for 5.3.21
array_walk 0.0024359226226807, array_map 0.0036611557006836, 66.534253711904%
Output for 5.3.20
array_walk 0.0021519660949707, array_map 0.0035088062286377, 61.330434191751%
Output for 5.3.19
array_walk 0.0022408962249756, array_map 0.0027229785919189, 82.295770948253%
Output for 5.3.18
array_walk 0.0021629333496094, array_map 0.0033040046691895, 65.463991918026%
Output for 5.3.17
array_walk 0.0024380683898926, array_map 0.0036270618438721, 67.218826004075%
Output for 5.3.16
array_walk 0.0015919208526611, array_map 0.0033309459686279, 47.791854555866%
Output for 5.3.15
array_walk 0.0020740032196045, array_map 0.0037939548492432, 54.665996355181%
Output for 5.3.14
array_walk 0.0024349689483643, array_map 0.0037920475006104, 64.212511788746%
Output for 5.3.13
array_walk 0.0024971961975098, array_map 0.0036680698394775, 68.07929801755%
Output for 5.3.12
array_walk 0.001816987991333, array_map 0.0026710033416748, 68.026421494243%
Output for 5.3.11
array_walk 0.0019950866699219, array_map 0.0029699802398682, 67.175082283054%
Output for 5.3.10
array_walk 0.0024509429931641, array_map 0.0036768913269043, 66.658021008948%
Output for 5.3.9
array_walk 0.0023629665374756, array_map 0.0035290718078613, 66.957167950277%
Output for 5.3.8
array_walk 0.0023171901702881, array_map 0.0034439563751221, 67.282796815507%
Output for 5.3.7
array_walk 0.0014638900756836, array_map 0.0022339820861816, 65.528281750267%
Output for 5.3.6
array_walk 0.00242018699646, array_map 0.003803014755249, 63.638643345245%
Output for 5.3.5
array_walk 0.0021190643310547, array_map 0.0032839775085449, 64.527370408015%
Output for 5.3.4
array_walk 0.0021979808807373, array_map 0.0031719207763672, 69.294948887553%
Output for 5.3.3
array_walk 0.0023679733276367, array_map 0.0036048889160156, 65.687830687831%
Output for 5.3.2
array_walk 0.0026049613952637, array_map 0.0040929317474365, 63.645366109396%
Output for 5.3.1
array_walk 0.0023767948150635, array_map 0.0035400390625, 67.140355603448%
Output for 5.3.0
array_walk 0.0024871826171875, array_map 0.0032939910888672, 75.506658946149%
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/mugat on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/mugat on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/mugat on line 5
Process exited with code 255.