3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $avg = 10; $calls = 1000000; class Foo {} function f0($foo) {} function f1(Foo $foo) {} function f2(Foo $foo = null) {} $foo = new Foo(); $m = array(); for ($j = 0; $j < $avg; $j++) { $start = microtime(true); for ($i = 0; $i < $calls; $i++) { f0($foo); } $m[] = microtime(true) - $start; } var_dump(array_sum($m) / $avg); $m = array(); for ($j = 0; $j < $avg; $j++) { $start = microtime(true); for ($i = 0; $i < $calls; $i++) { f1($foo); } $m[] = microtime(true) - $start; } var_dump(array_sum($m) / $avg); $m = array(); for ($j = 0; $j < $avg; $j++) { $start = microtime(true); for ($i = 0; $i < $calls; $i++) { f2($foo); } $m[] = microtime(true) - $start; } var_dump(array_sum($m) / $avg);
Output for 7.0.12
float(0.025119781494141) float(0.027783823013306) float(-0.12642347812653)
Output for 7.0.11
float(0.026404595375061) float(-0.037559509277344) float(0.028267407417297)
Output for 7.0.10
float(0.02593297958374) float(-0.045590710639954) float(0.02866678237915)
Output for 7.0.9
float(0.0064702272415161) float(0.02753791809082) float(0.028125381469727)
Output for 7.0.8
float(0.01949610710144) float(0.029436016082764) float(0.029186153411865)
Output for 7.0.7
float(0.026294183731079) float(0.028159618377686) float(-0.10265328884125)
Output for 7.0.6
float(0.026109552383423) float(0.026952409744263) float(-0.081821393966675)
Output for 7.0.5
float(0.026452207565308) float(0.027532815933228) float(-0.094988203048706)
Output for 7.0.4
float(0.026565599441528) float(-0.067289280891418) float(0.037190103530884)
Output for 7.0.3
float(-0.027983283996582) float(0.037934613227844) float(0.1041934967041)
Output for 7.0.2
float(0.026381206512451) float(0.027511477470398) float(-0.12872838973999)
Output for 7.0.1
float(0.036261653900146) float(0.03696346282959) float(0.037935400009155)
Output for 7.0.0
float(0.025208759307861) float(0.026939392089844) float(-0.087398409843445)
Output for 5.6.26
float(-0.085090684890747) float(0.1034955739975)
Process exited with code 137.
Output for 5.6.25
float(0.0041170120239258) float(0.10226202011108)
Process exited with code 137.
Output for 5.6.24
float(0.063975095748901) float(0.14968862533569)
Process exited with code 137.
Output for 5.6.23
float(0.070017528533936) float(0.1041975736618)
Process exited with code 137.
Output for 5.6.22
float(0.032321906089783) float(0.10260829925537)
Process exited with code 137.
Output for 5.6.21
float(-0.028052234649658) float(0.24546818733215)
Process exited with code 137.
Output for 5.6.20
float(-0.070299577713013) float(0.10500030517578)
Process exited with code 137.
Output for 5.6.19
float(0.068952488899231) float(0.10247106552124)
Process exited with code 137.
Output for 5.6.18
float(0.068333888053894) float(0.10319719314575)
Process exited with code 137.
Output for 5.6.17
float(0.076999378204346) float(0.10203001499176)
Process exited with code 137.
Output for 5.6.16
float(-0.048207831382751) float(0.10583231449127)
Process exited with code 137.
Output for 5.6.15
float(0.06312952041626) float(0.1044821023941)
Process exited with code 137.
Output for 5.6.14
float(0.12563943862915)
Process exited with code 137.
Output for 5.6.13
float(0.05715389251709) float(0.12916581630707)
Process exited with code 137.
Output for 5.6.12
float(-0.017120218276978) float(0.1028223991394)
Process exited with code 137.
Output for 5.6.11
float(0.028165292739868) float(0.18853306770325)
Process exited with code 137.
Output for 5.6.10
float(0.071473240852356) float(0.10638687610626)
Process exited with code 137.
Output for 5.6.9
float(0.079684329032898) float(0.10362601280212)
Process exited with code 137.
Output for 5.6.8
float(-0.04235737323761) float(0.1053151845932)
Process exited with code 137.
Output for 5.6.7
float(0.079450345039368) float(0.1045649766922)
Process exited with code 137.
Output for 5.6.6
float(-0.068489980697632) float(0.10594499111176)
Process exited with code 137.
Output for 5.6.5
float(0.065797472000122) float(0.10347671508789)
Process exited with code 137.
Output for 5.6.4
float(0.017152309417725) float(0.10362267494202)
Process exited with code 137.
Output for 5.6.3
float(-0.040114283561707) float(0.10159480571747)
Process exited with code 137.
Output for 5.6.2
float(0.083998417854309) float(-0.069111227989197)
Process exited with code 137.
Output for 5.6.1
float(-0.072506833076477) float(0.10311892032623)
Process exited with code 137.
Output for 5.6.0
float(0.039216804504395) float(0.10217189788818)
Process exited with code 137.
Output for 5.5.38
float(-0.069767022132874) float(0.10062565803528)
Process exited with code 137.
Output for 5.5.37
float(-0.046162128448486) float(0.10100419521332)
Process exited with code 137.
Output for 5.5.36
float(-0.060786080360413) float(0.10285174846649)
Process exited with code 137.
Output for 5.5.35
float(0.051714396476746) float(0.1060802936554)
Process exited with code 137.
Output for 5.5.34
float(0.048039841651917) float(0.15281057357788)
Process exited with code 137.
Output for 5.5.33
float(-0.026858925819397) float(0.24721519947052)
Process exited with code 137.
Output for 5.5.32
float(-0.0064953565597534) float(0.20860159397125)
Process exited with code 137.
Output for 5.5.31
float(0.011569976806641) float(0.10733473300934)
Process exited with code 137.
Output for 5.5.30
float(0.083604717254639) float(-0.062214970588684)
Process exited with code 137.
Output for 5.5.29
float(-0.05456714630127) float(0.26557970046997)
Process exited with code 137.
Output for 5.5.28
float(0.073298525810242) float(0.10512187480927)
Process exited with code 137.
Output for 5.5.27
float(0.087609672546387) float(-0.070612335205078)
Process exited with code 137.
Output for 5.5.26
float(-0.038405132293701) float(0.10455980300903)
Process exited with code 137.
Output for 5.5.25
float(-0.0019408941268921) float(0.21423618793488)
Process exited with code 137.
Output for 5.5.24
float(0.10283727645874) float(0.10418629646301)
Process exited with code 137.
Output for 5.5.23
float(0.075680708885193) float(0.10585470199585)
Process exited with code 137.
Output for 5.5.22
float(0.011225390434265) float(0.10333411693573)
Process exited with code 137.
Output for 5.5.21
float(-0.048069787025452) float(0.1027752161026)
Process exited with code 137.
Output for 5.5.20
float(-0.068754267692566) float(0.10254321098328)
Process exited with code 137.
Output for 5.5.19
float(0.073930740356445) float(0.10309312343597)
Process exited with code 137.
Output for 5.5.18
float(0.014550256729126) float(0.1040164232254)
Process exited with code 137.
Output for 5.5.16
float(-0.048307394981384) float(0.11821231842041)
Process exited with code 137.
Output for 5.5.15
float(0.009332799911499) float(0.10122711658478)
Process exited with code 137.
Output for 5.5.14
float(-0.065914988517761) float(0.10708522796631)
Process exited with code 137.
Output for 5.5.13
float(0.071894335746765) float(0.10126321315765)
Process exited with code 137.
Output for 5.5.12
float(0.080054593086243) float(0.10718998908997)
Process exited with code 137.
Output for 5.5.11
float(-0.077270126342773) float(0.10677959918976)
Process exited with code 137.
Output for 5.5.10
float(-0.040777730941772) float(0.10772910118103)
Process exited with code 137.
Output for 5.5.9
float(0.1087593793869) float(0.10256419181824)
Process exited with code 137.
Output for 5.5.8
float(0.01643979549408) float(0.18774466514587)
Process exited with code 137.
Output for 5.5.7
float(0.07711443901062) float(-0.056446599960327)
Process exited with code 137.
Output for 5.5.6
float(-0.03064432144165) float(0.10289039611816)
Process exited with code 137.
Output for 5.5.5
float(0.07847683429718) float(0.10147042274475)
Process exited with code 137.
Output for 5.5.4
float(0.077254962921143) float(0.10247712135315)
Process exited with code 137.
Output for 5.5.3
float(-0.064055991172791) float(0.10538029670715)
Process exited with code 137.
Output for 5.5.2
float(-0.037322473526001) float(0.10613434314728)
Process exited with code 137.
Output for 5.5.1
float(0.10046088695526) float(0.12518701553345)
Process exited with code 137.
Output for 5.5.0
float(-0.054257488250732) float(0.10569462776184)
Process exited with code 137.
Output for 5.4.45
float(0.018855214118958) float(0.10808997154236)
Process exited with code 137.
Output for 5.4.44
float(-0.048901200294495) float(0.10447659492493)
Process exited with code 137.
Output for 5.4.43
float(-0.065663814544678) float(0.10501351356506)
Process exited with code 137.
Output for 5.4.42
float(0.045379710197449) float(0.10458331108093)
Process exited with code 137.
Output for 5.4.41
float(0.019659924507141) float(0.10514738559723)
Process exited with code 137.
Output for 5.4.40
float(0.05370945930481) float(0.14980127811432)
Process exited with code 137.
Output for 5.4.39
float(-0.015224480628967) float(0.10492053031921)
Process exited with code 137.
Output for 5.4.38
float(0.047312760353088) float(0.10355451107025)
Process exited with code 137.
Output for 5.4.37
float(-0.0084945440292358) float(0.21491339206696)
Process exited with code 137.
Output for 5.4.36
float(0.078141903877258) float(-0.059531593322754)
Process exited with code 137.
Output for 5.4.35
float(0.043867421150208) float(0.10404353141785)
Process exited with code 137.
Output for 5.4.34
float(-0.01351101398468) float(0.10541884899139)
Process exited with code 137.
Output for 5.4.32
float(0.065384697914124) float(0.10468122959137)
Process exited with code 137.
Output for 5.4.31
float(0.088185214996338) float(0.11770811080933)
Process exited with code 137.
Output for 5.4.30
float(0.043424487113953) float(0.10598721504211)
Process exited with code 137.
Output for 5.4.29
float(-0.039311265945435) float(0.24077298641205)
Process exited with code 137.
Output for 5.4.28
float(-0.02210009098053) float(0.10060358047485)
Process exited with code 137.
Output for 5.4.27
float(0.0041420698165894) float(0.10034959316254)
Process exited with code 137.
Output for 5.4.26
float(0.029883170127869) float(0.10369739532471)
Process exited with code 137.
Output for 5.4.25
float(0.062681913375854) float(0.10899229049683)
Process exited with code 137.
Output for 5.4.24
float(0.076639223098755) float(0.10520529747009)
Process exited with code 137.
Output for 5.4.23
float(-0.059055280685425) float(0.10156002044678)
Process exited with code 137.
Output for 5.4.22
float(0.069618701934814) float(0.13059282302856)
Process exited with code 137.
Output for 5.4.21
float(-0.006456995010376) float(0.10348362922668)
Process exited with code 137.
Output for 5.4.20
float(0.10235126018524) float(0.1017324924469)
Process exited with code 137.
Output for 5.4.19
float(0.044489884376526) float(0.10251922607422)
Process exited with code 137.
Output for 5.4.18
float(0.086208724975586) float(0.12005431652069)
Process exited with code 137.
Output for 5.4.17
float(0.012012815475464) float(0.10471205711365)
Process exited with code 137.
Output for 5.4.16
float(-0.032017374038696) float(0.1045599937439)
Process exited with code 137.
Output for 5.4.15
float(0.07572329044342) float(0.10312218666077)
Process exited with code 137.
Output for 5.4.14
float(0.029962873458862) float(0.10876429080963)
Process exited with code 137.
Output for 5.4.13
float(-0.044837093353271) float(0.10712161064148)
Process exited with code 137.
Output for 5.4.12
float(-0.029472780227661) float(0.10643489360809)
Process exited with code 137.
Output for 5.4.11
float(0.0037454128265381) float(0.19740560054779)
Process exited with code 137.
Output for 5.4.10
float(0.021648812294006) float(0.12047576904297)
Process exited with code 137.
Output for 5.4.9
float(0.052110576629639) float(0.10617718696594)
Process exited with code 137.
Output for 5.4.8
float(0.077930498123169) float(0.10688421726227)
Process exited with code 137.
Output for 5.4.7
float(0.075714159011841) float(0.10493409633636)
Process exited with code 137.
Output for 5.4.6
float(0.10286407470703) float(0.11992137432098)
Process exited with code 137.
Output for 5.4.5
float(0.073137521743774) float(0.10499699115753)
Process exited with code 137.
Output for 5.4.4
float(0.077169728279114) float(0.10607290267944)
Process exited with code 137.
Output for 5.4.3
float(0.011076021194458) float(0.21650178432465)
Process exited with code 137.
Output for 5.4.2
float(0.053212404251099) float(0.13434298038483)
Process exited with code 137.
Output for 5.4.1
float(-0.019863796234131) float(0.1063239812851)
Process exited with code 137.
Output for 5.4.0
float(0.07629930973053) float(0.10428760051727)
Process exited with code 137.
Output for 5.3.29
float(-0.0045416831970215) float(0.21719479560852)
Process exited with code 137.
Output for 5.3.28
float(0.045017766952515) float(0.1670548915863)
Process exited with code 137.
Output for 5.3.27
float(-0.082901811599731) float(0.294775390625)
Process exited with code 137.
Output for 5.3.26
float(0.071837019920349) float(0.11998343467712)
Process exited with code 137.
Output for 5.3.25
float(0.10890650749207) float(0.11878688335419)
Process exited with code 137.
Output for 5.3.24
float(-0.066590666770935) float(0.28225603103638)
Process exited with code 137.
Output for 5.3.23
float(0.0743088722229) float(0.11831529140472)
Process exited with code 137.
Output for 5.3.22
float(0.095103240013123) float(0.12363810539246)
Process exited with code 137.
Output for 5.3.21
float(-0.080561971664429) float(0.32342908382416)
Process exited with code 137.
Output for 5.3.20
float(-0.04967155456543) float(0.2641948223114)
Process exited with code 137.
Output for 5.3.19
float(-0.021881866455078) float(0.23597679138184)
Process exited with code 137.
Output for 5.3.18
float(0.011301732063293) float(0.20684230327606)
Process exited with code 137.
Output for 5.3.17
float(0.035670208930969) float(0.17637591362)
Process exited with code 137.
Output for 5.3.16
float(0.10290079116821)
Process exited with code 137.
Output for 5.3.15
float(-0.022736716270447) float(0.2446074962616)
Process exited with code 137.
Output for 5.3.14
float(0.0016010046005249) float(0.21354081630707)
Process exited with code 137.
Output for 5.3.13
float(-0.060026979446411) float(0.27323610782623)
Process exited with code 137.
Output for 5.3.12
float(-0.030096411705017) float(0.24446280002594)
Process exited with code 137.
Output for 5.3.11
float(0.084124636650085) float(0.12083160877228)
Process exited with code 137.
Output for 5.3.10
float(0.022942709922791) float(0.19255712032318)
Process exited with code 137.
Output for 5.3.9
float(0.10909721851349)
Process exited with code 137.
Output for 5.3.8
float(0.051938605308533) float(0.16552340984344)
Process exited with code 137.
Output for 5.3.7
float(-0.021204209327698) float(0.24216487407684)
Process exited with code 137.
Output for 5.3.6
float(0.10705761909485)
Process exited with code 137.
Output for 5.3.5
float(0.10678112506866)
Process exited with code 137.
Output for 5.3.4
float(-0.079376220703125) float(0.29868719577789)
Process exited with code 137.
Output for 5.3.3
float(0.037367248535156) float(0.18385348320007)
Process exited with code 137.
Output for 5.3.2
float(-0.049464917182922) float(0.26824436187744)
Process exited with code 137.
Output for 5.3.1
float(0.065230226516724) float(0.12268261909485)
Process exited with code 137.
Output for 5.3.0
float(0.10744435787201)
Process exited with code 137.