3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo($v) { return $v + 1; } $foo = function ($v) { return $v + 1; }; $a = range(0,100000); $t = microtime(1); array_walk($a, 'foo'); $t = microtime(1) - $t; var_dump($t); $a = range(0,100000); $t = microtime(1); array_walk($a, function ($v) { return $v + 1; }); $t = microtime(1) - $t; var_dump($t);
based on 3FOmp
Output for 7.1.0
float(0.010125875473022) float(0.0097901821136475)
Output for 7.0.14
float(0.00742506980896) float(0.0077269077301025)
Output for 7.0.6
float(0.0062861442565918) float(0.0080218315124512)
Output for 7.0.5
float(0.0063819885253906) float(0.0095760822296143)
Output for 7.0.4
float(0.0041160583496094) float(0.0065839290618896)
Output for 7.0.3
float(0.0048789978027344) float(0.0083210468292236)
Output for 7.0.2
float(0.0059762001037598) float(0.0083789825439453)
Output for 7.0.1
float(0.0063462257385254) float(0.0087928771972656)
Output for 7.0.0
float(0.0058820247650146) float(0.00913405418396)
Output for hhvm-3.12.0
float(0.013463020324707) float(0.014101028442383)
Output for hhvm-3.10.0
float(0.014123916625977) float(0.015000820159912)
Output for 5.6.28
float(0.025439977645874) float(0.019066095352173)
Output for 5.6.21
float(0.019459962844849) float(0.013124942779541)
Output for 5.6.20
float(0.018671035766602) float(0.013743877410889)
Output for 5.6.19
float(0.015022993087769) float(0.012991905212402)
Output for 5.6.18
float(0.015071868896484) float(0.012158155441284)
Output for 5.6.17
float(0.015172004699707) float(0.012351989746094)
Output for 5.6.16
float(0.015614032745361) float(0.014169216156006)
Output for 5.6.15
float(0.015367984771729) float(0.012403964996338)
Output for 5.6.14
float(0.021155118942261) float(0.015466928482056)
Output for 5.6.13
float(0.016036033630371) float(0.012822866439819)
Output for 5.6.12
float(0.015033960342407) float(0.012465000152588)
Output for 5.6.11
float(0.021907806396484) float(0.015669107437134)
Output for 5.6.10
float(0.021129846572876) float(0.015043020248413)
Output for 5.6.9
float(0.020863056182861) float(0.015172958374023)
Output for 5.6.8
float(0.022074937820435) float(0.01574182510376)
Output for 5.5.35
float(0.021721839904785) float(0.012387990951538)
Output for 5.5.34
float(0.02032208442688) float(0.014424085617065)
Output for 5.5.33
float(0.018720865249634) float(0.013617038726807)
Output for 5.5.32
float(0.014287948608398) float(0.011718988418579)
Output for 5.5.31
float(0.017906904220581) float(0.013144016265869)
Output for 5.5.30
float(0.015734195709229) float(0.012935876846313)
Output for 5.5.29
float(0.01502513885498) float(0.011881113052368)
Output for 5.5.28
float(0.014611959457397) float(0.012001037597656)
Output for 5.5.27
float(0.01796293258667) float(0.013349056243896)
Output for 5.5.26
float(0.024015188217163) float(0.017437934875488)
Output for 5.5.25
float(0.021967172622681) float(0.01572585105896)
Output for 5.5.24
float(0.018494129180908) float(0.01344108581543)
Output for 5.4.45
float(0.035771131515503) float(0.050496816635132)
Output for 5.4.44
float(0.01298189163208) float(0.0206139087677)
Output for 5.4.43
float(0.042802810668945) float(0.035362958908081)
Output for 5.4.42
float(0.026021957397461) float(0.02193808555603)
Output for 5.4.41
float(0.025708198547363) float(0.020342111587524)
Output for 5.4.40
float(0.050266981124878) float(0.014799118041992)
Output for 5.4.39
float(0.012362003326416) float(0.010506153106689)
Output for 5.4.38
float(0.04303503036499) float(0.039277076721191)
Output for 5.4.37
float(0.023834228515625) float(0.020864009857178)
Output for 5.4.36
float(0.031433820724487) float(0.02069616317749)
Output for 5.4.35
float(0.033651113510132) float(0.033738851547241)
Output for 5.4.34
float(0.023825883865356) float(0.04040789604187)
Output for 5.4.32
float(0.017060995101929) float(0.013953924179077)
Output for 5.4.31
float(0.017179012298584) float(0.020265102386475)
Output for 5.4.30
float(0.017320156097412) float(0.015554904937744)
Output for 5.4.29
float(0.018752813339233) float(0.01411509513855)
Output for 5.4.28
float(0.016642808914185) float(0.014104127883911)
Output for 5.4.27
float(0.017853021621704) float(0.014252901077271)
Output for 5.4.26
float(0.017603874206543) float(0.01424503326416)
Output for 5.4.25
float(0.017091035842896) float(0.013909101486206)
Output for 5.4.24
float(0.018424034118652) float(0.015633106231689)
Output for 5.4.23
float(0.01726508140564) float(0.013827085494995)
Output for 5.4.22
float(0.035648107528687) float(0.014315128326416)
Output for 5.4.21
float(0.017094850540161) float(0.013667821884155)
Output for 5.4.20
float(0.017139911651611) float(0.013816118240356)
Output for 5.4.19
float(0.018301010131836) float(0.013983964920044)
Output for 5.4.18
float(0.018357038497925) float(0.013998031616211)
Output for 5.4.17
float(0.017215967178345) float(0.01366400718689)
Output for 5.4.16
float(0.018910884857178) float(0.014835119247437)
Output for 5.4.15
float(0.018141984939575) float(0.014549970626831)
Output for 5.4.14
float(0.016669988632202) float(0.013672113418579)
Output for 5.4.13
float(0.017770051956177) float(0.02106499671936)
Output for 5.4.12
float(0.018446922302246) float(0.024626970291138)
Output for 5.4.11
float(0.018817901611328) float(0.014779090881348)
Output for 5.4.10
float(0.018133878707886) float(0.014949798583984)
Output for 5.4.9
float(0.017697811126709) float(0.014541149139404)
Output for 5.4.8
float(0.017786026000977) float(0.014976978302002)
Output for 5.4.7
float(0.017109870910645) float(0.027699947357178)
Output for 5.4.6
float(0.019876956939697) float(0.015424013137817)
Output for 5.4.5
float(0.018379926681519) float(0.015085935592651)
Output for 5.4.4
float(0.018436908721924) float(0.014778137207031)
Output for 5.4.3
float(0.019537210464478) float(0.01594090461731)
Output for 5.4.2
float(0.020804166793823) float(0.029048919677734)
Output for 5.4.1
float(0.044502973556519) float(0.029537916183472)
Output for 5.4.0
float(0.037819862365723) float(0.014663934707642)
Output for 5.3.29
float(0.017364978790283) float(0.015321016311646)
Output for 5.3.28
float(0.017385959625244) float(0.01515007019043)
Output for 5.3.27
float(0.018817901611328) float(0.014209985733032)
Output for 5.3.26
float(0.017755031585693) float(0.014441967010498)
Output for 5.3.25
float(0.017719030380249) float(0.014824867248535)
Output for 5.3.24
float(0.018298149108887) float(0.015100002288818)
Output for 5.3.23
float(0.026695966720581) float(0.015496015548706)
Output for 5.3.22
float(0.027367115020752) float(0.02222204208374)
Output for 5.3.21
float(0.018424987792969) float(0.015661001205444)
Output for 5.3.20
float(0.018439054489136) float(0.016365051269531)
Output for 5.3.19
float(0.019850015640259) float(0.017584085464478)
Output for 5.3.18
float(0.01967716217041) float(0.015536069869995)
Output for 5.3.17
float(0.03129506111145) float(0.02588677406311)
Output for 5.3.16
float(0.029614925384521) float(0.01922607421875)
Output for 5.3.15
float(0.017788887023926) float(0.014915943145752)
Output for 5.3.14
float(0.018385171890259) float(0.014700889587402)
Output for 5.3.13
float(0.017637968063354) float(0.01488995552063)
Output for 5.3.12
float(0.018266916275024) float(0.014695882797241)
Output for 5.3.11
float(0.017949819564819) float(0.014883995056152)
Output for 5.3.10
float(0.017523050308228) float(0.014518976211548)
Output for 5.3.9
float(0.017554044723511) float(0.015049934387207)
Output for 5.3.8
float(0.016880035400391) float(0.014663934707642)
Output for 5.3.7
float(0.017924785614014) float(0.015070915222168)
Output for 5.3.6
float(0.017355918884277) float(0.01459002494812)
Output for 5.3.5
float(0.01784086227417) float(0.015027046203613)
Output for 5.3.4
float(0.018146991729736) float(0.015005111694336)
Output for 5.3.3
float(0.017289876937866) float(0.014770984649658)
Output for 5.3.2
float(0.018178939819336) float(0.01463794708252)
Output for 5.3.1
float(0.020069122314453) float(0.017283916473389)
Output for 5.3.0
float(0.018558025360107) float(0.015484094619751)
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/LiWEh on line 7
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/LiWEh on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/LiWEh on line 7
Process exited with code 255.