3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $avg = 2; $calls = 100000; 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.1.0
float(0.0023093223571777) float(0.0026506185531616) float(0.0039263963699341)
Output for 7.0.14
float(0.0057433843612671) float(0.0066269636154175) float(0.0063625574111938)
Output for 7.0.10
float(0.0028359889984131) float(0.0036869049072266) float(0.0038349628448486)
Output for 7.0.9
float(0.0026805400848389) float(0.0029749870300293) float(0.0029869079589844)
Output for 7.0.8
float(0.0029881000518799) float(0.0037665367126465) float(0.0037950277328491)
Output for 7.0.7
float(0.0022799968719482) float(0.0029795169830322) float(0.0030009746551514)
Output for 7.0.6
float(0.0023986101150513) float(0.0030834674835205) float(0.0032675266265869)
Output for 7.0.5
float(0.0021214485168457) float(0.0027350187301636) float(0.0028860569000244)
Output for 7.0.4
float(0.0023775100708008) float(0.0030499696731567) float(0.0032260417938232)
Output for 7.0.3
float(0.0033040046691895) float(0.0043500661849976) float(0.003275990486145)
Output for 7.0.2
float(0.0053695440292358) float(0.0055710077285767) float(0.005728006362915)
Output for 7.0.1
float(0.0034160614013672) float(0.0044000148773193) float(0.0042489767074585)
Output for 7.0.0
float(0.0056639909744263) float(0.0049895048141479) float(0.0063290596008301)
Output for hhvm-3.12.0
float(0.015183925628662) float(0.017210006713867) float(0.01757800579071)
Output for hhvm-3.10.0
float(0.026612997055054) float(0.027719497680664) float(0.027833461761475)
Output for 5.6.28
float(0.013095498085022) float(0.017086505889893) float(0.015999555587769)
Output for 5.6.25
float(0.0085809230804443) float(0.017879009246826) float(0.017516493797302)
Output for 5.6.24
float(0.0087494850158691) float(0.015592098236084) float(0.015768527984619)
Output for 5.6.23
float(0.0076993703842163) float(0.015732407569885) float(0.01576554775238)
Output for 5.6.22
float(0.0077475309371948) float(0.015384554862976) float(0.015220522880554)
Output for 5.6.21
float(0.0085508823394775) float(0.017040491104126) float(0.017276048660278)
Output for 5.6.20
float(0.0070074796676636) float(0.014588594436646) float(0.01453161239624)
Output for 5.6.19
float(0.0094355344772339) float(0.017459034919739) float(0.014242053031921)
Output for 5.6.18
float(0.010636448860168) float(0.019460439682007) float(0.017884612083435)
Output for 5.6.17
float(0.010677933692932) float(0.019457936286926) float(0.018500328063965)
Output for 5.6.16
float(0.011967539787292) float(0.022189021110535) float(0.018160820007324)
Output for 5.6.15
float(0.012549877166748) float(0.020111918449402) float(0.01830005645752)
Output for 5.6.14
float(0.011950969696045) float(0.02086353302002) float(0.019132018089294)
Output for 5.6.13
float(0.011650443077087) float(0.021307468414307) float(0.019330978393555)
Output for 5.6.12
float(0.012650012969971) float(0.019616484642029) float(0.017873525619507)
Output for 5.6.11
float(0.0095710754394531) float(0.017834544181824) float(0.018100619316101)
Output for 5.6.10
float(0.015636444091797) float(0.022894501686096) float(0.019708514213562)
Output for 5.6.9
float(0.010795593261719) float(0.018727540969849) float(0.017157793045044)
Output for 5.6.8
float(0.01138699054718) float(0.021052002906799) float(0.019565939903259)
Output for 5.6.7
float(0.01392388343811) float(0.025115966796875) float(0.021710515022278)
Output for 5.6.6
float(0.010932087898254) float(0.018548965454102) float(0.017278075218201)
Output for 5.6.5
float(0.010901570320129) float(0.018245458602905) float(0.017251968383789)
Output for 5.6.4
float(0.0094695091247559) float(0.018394470214844) float(0.017042517662048)
Output for 5.6.3
float(0.010406494140625) float(0.019478440284729) float(0.01983654499054)
Output for 5.6.2
float(0.012594938278198) float(0.022866487503052) float(0.020737409591675)
Output for 5.6.1
float(0.013433575630188) float(0.021489500999451) float(0.018295526504517)
Output for 5.6.0
float(0.013701915740967) float(0.020194053649902) float(0.016889572143555)
Output for 5.5.38
float(0.0083739757537842) float(0.016877055168152) float(0.016846060752869)
Output for 5.5.37
float(0.0085431337356567) float(0.01695442199707) float(0.017039060592651)
Output for 5.5.36
float(0.0084559917449951) float(0.017287969589233) float(0.017002463340759)
Output for 5.5.35
float(0.0082590579986572) float(0.016811490058899) float(0.017499566078186)
Output for 5.5.34
float(0.008357048034668) float(0.016297578811646) float(0.016621112823486)
Output for 5.5.33
float(0.0081175565719604) float(0.016068577766418) float(0.016111373901367)
Output for 5.5.32
float(0.010984539985657) float(0.020259499549866) float(0.018016457557678)
Output for 5.5.31
float(0.012745976448059) float(0.021531462669373) float(0.0188889503479)
Output for 5.5.30
float(0.012879490852356) float(0.022040486335754) float(0.018113136291504)
Output for 5.5.29
float(0.012987017631531) float(0.024688005447388) float(0.019187450408936)
Output for 5.5.28
float(0.0082879066467285) float(0.016840100288391) float(0.018275022506714)
Output for 5.5.27
float(0.011440992355347) float(0.018561959266663) float(0.019078493118286)
Output for 5.5.26
float(0.0082769393920898) float(0.016970038414001) float(0.01722252368927)
Output for 5.5.25
float(0.011458039283752) float(0.02049195766449) float(0.018460869789124)
Output for 5.5.24
float(0.010581493377686) float(0.01912796497345) float(0.017722010612488)
Output for 5.5.23
float(0.011475443840027) float(0.018679022789001) float(0.017282485961914)
Output for 5.5.22
float(0.013145089149475) float(0.02381706237793) float(0.02076256275177)
Output for 5.5.21
float(0.010213613510132) float(0.01811408996582) float(0.017515540122986)
Output for 5.5.20
float(0.01317298412323) float(0.023302435874939) float(0.018818020820618)
Output for 5.5.19
float(0.010735511779785) float(0.021846532821655) float(0.020753383636475)
Output for 5.5.18
float(0.011129856109619) float(0.019931554794312) float(0.018420577049255)
Output for 5.5.16
float(0.013668894767761) float(0.0236656665802) float(0.020843029022217)
Output for 5.5.15
float(0.010330080986023) float(0.01740550994873) float(0.017432570457458)
Output for 5.5.14
float(0.013180017471313) float(0.023831963539124) float(0.021201372146606)
Output for 5.5.13
float(0.011070489883423) float(0.020617485046387) float(0.018699407577515)
Output for 5.5.12
float(0.010923027992249) float(0.019720435142517) float(0.018107056617737)
Output for 5.5.11
float(0.008201003074646) float(0.017762064933777) float(0.020330429077148)
Output for 5.5.10
float(0.013799071311951) float(0.021033048629761) float(0.022052049636841)
Output for 5.5.9
float(0.011294484138489) float(0.020473957061768) float(0.021188497543335)
Output for 5.5.8
float(0.0083644390106201) float(0.017166376113892) float(0.016863465309143)
Output for 5.5.7
float(0.010364055633545) float(0.019858002662659) float(0.018158674240112)
Output for 5.5.6
float(0.013330101966858) float(0.024247527122498) float(0.021143913269043)
Output for 5.5.5
float(0.012653350830078) float(0.022513866424561) float(0.017441034317017)
Output for 5.5.4
float(0.013339400291443) float(0.023919582366943) float(0.021028518676758)
Output for 5.5.3
float(0.014269471168518) float(0.024473905563354) float(0.021550416946411)
Output for 5.5.2
float(0.013131618499756) float(0.024043440818787) float(0.020848035812378)
Output for 5.5.1
float(0.011770486831665) float(0.021662592887878) float(0.019316077232361)
Output for 5.5.0
float(0.010623574256897) float(0.020530581474304) float(0.025144100189209)
Output for 5.4.45
float(0.01247239112854) float(0.023900628089905) float(0.020574450492859)
Output for 5.4.44
float(0.0094454288482666) float(0.019094467163086) float(0.017667055130005)
Output for 5.4.43
float(0.012310147285461) float(0.023478507995605) float(0.020396947860718)
Output for 5.4.42
float(0.010702610015869) float(0.021083950996399) float(0.020366907119751)
Output for 5.4.41
float(0.012210488319397) float(0.023021578788757) float(0.017067909240723)
Output for 5.4.40
float(0.012405037879944) float(0.02448844909668) float(0.020921587944031)
Output for 5.4.39
float(0.010165929794312) float(0.019977331161499) float(0.020516991615295)
Output for 5.4.38
float(0.012205958366394) float(0.023579001426697) float(0.031047463417053)
Output for 5.4.37
float(0.0097146034240723) float(0.01875901222229) float(0.01693332195282)
Output for 5.4.36
float(0.011334657669067) float(0.017659068107605) float(0.016973376274109)
Output for 5.4.35
float(0.0094105005264282) float(0.019442439079285) float(0.017623424530029)
Output for 5.4.34
float(0.0122150182724) float(0.021822094917297) float(0.02141261100769)
Output for 5.4.32
float(0.010991096496582) float(0.020015954971313) float(0.018319010734558)
Output for 5.4.31
float(0.010649442672729) float(0.020824909210205) float(0.017866969108582)
Output for 5.4.30
float(0.0097129344940186) float(0.019891500473022) float(0.017168045043945)
Output for 5.4.29
float(0.010034918785095) float(0.020084023475647) float(0.018130421638489)
Output for 5.4.28
float(0.01173210144043) float(0.022807955741882) float(0.020064949989319)
Output for 5.4.27
float(0.0082989931106567) float(0.01833188533783) float(0.01784884929657)
Output for 5.4.26
float(0.012345433235168) float(0.018711090087891) float(0.017589926719666)
Output for 5.4.25
float(0.0098340511322021) float(0.019670844078064) float(0.019621014595032)
Output for 5.4.24
float(0.010299563407898) float(0.018294453620911) float(0.017126560211182)
Output for 5.4.23
float(0.0086174011230469) float(0.017696022987366) float(0.016482949256897)
Output for 5.4.22
float(0.011345028877258) float(0.01969051361084) float(0.018350481987)
Output for 5.4.21
float(0.0098365545272827) float(0.019139528274536) float(0.017292022705078)
Output for 5.4.20
float(0.011460542678833) float(0.019772529602051) float(0.01736056804657)
Output for 5.4.19
float(0.013405561447144) float(0.02226459980011) float(0.019271492958069)
Output for 5.4.18
float(0.012641549110413) float(0.024868488311768) float(0.02135956287384)
Output for 5.4.17
float(0.012531518936157) float(0.0213223695755) float(0.018275022506714)
Output for 5.4.16
float(0.0091326236724854) float(0.019026398658752) float(0.017006039619446)
Output for 5.4.15
float(0.0088388919830322) float(0.018012523651123) float(0.017427563667297)
Output for 5.4.14
float(0.012531995773315) float(0.024510025978088) float(0.02016544342041)
Output for 5.4.13
float(0.0096179246902466) float(0.018697500228882) float(0.017584085464478)
Output for 5.4.12
float(0.010717511177063) float(0.021027565002441) float(0.020178556442261)
Output for 5.4.11
float(0.01073956489563) float(0.018702030181885) float(0.016796112060547)
Output for 5.4.10
float(0.012290120124817) float(0.020140528678894) float(0.018118858337402)
Output for 5.4.9
float(0.011449098587036) float(0.021534562110901) float(0.018097996711731)
Output for 5.4.8
float(0.011605024337769) float(0.022582530975342) float(0.0200035572052)
Output for 5.4.7
float(0.01273500919342) float(0.02451503276825) float(0.021150588989258)
Output for 5.4.6
float(0.010603070259094) float(0.018520951271057) float(0.016897559165955)
Output for 5.4.5
float(0.013081550598145) float(0.021749973297119) float(0.019895434379578)
Output for 5.4.4
float(0.012037038803101) float(0.020602583885193) float(0.01695191860199)
Output for 5.4.3
float(0.0078444480895996) float(0.016921043395996) float(0.01690137386322)
Output for 5.4.2
float(0.0096015930175781) float(0.019156575202942) float(0.018777966499329)
Output for 5.4.1
float(0.011451005935669) float(0.020205497741699) float(0.018369555473328)
Output for 5.4.0
float(0.010191440582275) float(0.019567012786865) float(0.019148945808411)
Output for 5.3.29
float(0.018910884857178) float(0.021005630493164) float(0.022014498710632)
Output for 5.3.28
float(0.017526507377625) float(0.018898367881775) float(0.021598100662231)
Output for 5.3.27
float(0.020689964294434) float(0.022270917892456) float(0.020210981369019)
Output for 5.3.26
float(0.018052339553833) float(0.023412942886353) float(0.018674492835999)
Output for 5.3.25
float(0.02379298210144) float(0.021706938743591) float(0.019867420196533)
Output for 5.3.24
float(0.019131422042847) float(0.021617531776428) float(0.018743395805359)
Output for 5.3.23
float(0.024277448654175) float(0.025192499160767) float(0.02203357219696)
Output for 5.3.22
float(0.019754648208618) float(0.020280480384827) float(0.018500089645386)
Output for 5.3.21
float(0.022400975227356) float(0.019648551940918) float(0.018691539764404)
Output for 5.3.20
float(0.019450426101685) float(0.019961476325989) float(0.018610954284668)
Output for 5.3.19
float(0.018424510955811) float(0.020545482635498) float(0.018592000007629)
Output for 5.3.18
float(0.01894211769104) float(0.019797563552856) float(0.018267512321472)
Output for 5.3.17
float(0.021263837814331) float(0.023149132728577) float(0.020534992218018)
Output for 5.3.16
float(0.022273421287537) float(0.023555517196655) float(0.019222021102905)
Output for 5.3.15
float(0.019582986831665) float(0.021920561790466) float(0.01970899105072)
Output for 5.3.14
float(0.019665360450745) float(0.021904110908508) float(0.019062519073486)
Output for 5.3.13
float(0.022417068481445) float(0.023645520210266) float(0.020981907844543)
Output for 5.3.12
float(0.023592472076416) float(0.024961590766907) float(0.021834492683411)
Output for 5.3.11
float(0.023436427116394) float(0.022825598716736) float(0.019296050071716)
Output for 5.3.10
float(0.021707057952881) float(0.020597577095032) float(0.018546104431152)
Output for 5.3.9
float(0.021822094917297) float(0.023842096328735) float(0.02133047580719)
Output for 5.3.8
float(0.013795971870422) float(0.017862439155579) float(0.017474055290222)
Output for 5.3.7
float(0.024202585220337) float(0.02563750743866) float(0.02254843711853)
Output for 5.3.6
float(0.013956546783447) float(0.017683029174805) float(0.017204523086548)
Output for 5.3.5
float(0.023310661315918) float(0.022733569145203) float(0.020735025405884)
Output for 5.3.4
float(0.02244246006012) float(0.0200434923172) float(0.018852472305298)
Output for 5.3.3
float(0.021785497665405) float(0.020951986312866) float(0.019521594047546)
Output for 5.3.2
float(0.019865989685059) float(0.021446585655212) float(0.019339084625244)
Output for 5.3.1
float(0.021828532218933) float(0.022090077400208) float(0.020156145095825)
Output for 5.3.0
float(0.023530960083008) float(0.025110006332397) float(0.022381067276001)
Output for 5.2.17
float(0.029715538024902) float(0.033497929573059) float(0.032049417495728)
Output for 5.2.16
float(0.019643425941467) float(0.028991460800171) float(0.027952551841736)
Output for 5.2.15
float(0.032409429550171) float(0.037643432617188) float(0.031119108200073)
Output for 5.2.14
float(0.036372423171997) float(0.031309127807617) float(0.029917478561401)
Output for 5.2.13
float(0.024928569793701) float(0.034064888954163) float(0.034427404403687)
Output for 5.2.12
float(0.027765035629272) float(0.039384961128235) float(0.043174982070923)
Output for 5.2.11
float(0.025181531906128) float(0.031498551368713) float(0.029903054237366)
Output for 5.2.10
float(0.029567003250122) float(0.031314015388489) float(0.029896974563599)
Output for 5.2.9
float(0.030173063278198) float(0.034098625183105) float(0.029874563217163)
Output for 5.2.8
float(0.025245428085327) float(0.031537055969238) float(0.029498934745789)
Output for 5.2.7
float(0.024044394493103) float(0.030115962028503) float(0.029825448989868)
Output for 5.2.6
float(0.04229998588562) float(0.033997535705566) float(0.030036568641663)
Output for 5.2.5
float(0.030148029327393) float(0.030807971954346) float(0.029258966445923)
Output for 5.2.4
float(0.030395984649658) float(0.035130023956299) float(0.03419554233551)
Output for 5.2.3
float(0.029337406158447) float(0.035999536514282) float(0.036755084991455)
Output for 5.2.2
float(0.029389023780823) float(0.032491445541382) float(0.029916524887085)
Output for 5.2.1
float(0.033874034881592) float(0.038171529769897) float(0.031715989112854)
Output for 5.2.0
float(0.030559062957764) float(0.03603208065033) float(0.03028392791748)
Output for 5.1.6
float(0.019791007041931) float(0.031384468078613) float(0.035588026046753)
Output for 5.1.5
float(0.031723856925964) float(0.036788105964661) float(0.030418992042542)
Output for 5.1.4
float(0.030703544616699) float(0.034850120544434) float(0.033041477203369)
Output for 5.1.3
float(0.029263496398926) float(0.030567646026611) float(0.028614044189453)
Output for 5.1.2
float(0.032860517501831) float(0.037010073661804) float(0.031056046485901)
Output for 5.1.1
float(0.03111207485199) float(0.035164952278137) float(0.030148506164551)
Output for 5.1.0
float(0.033810019493103) float(0.037417054176331) float(0.031222939491272)
Output for 5.0.5
float(0.043256998062134) float(0.037182927131653) float(0.037008047103882)
Output for 5.0.4
float(0.05938196182251) float(0.039687037467957) float(0.036791086196899)
Output for 5.0.3
float(0.048689484596252) float(0.041086077690125) float(0.036066055297852)
Output for 5.0.2
float(0.044301152229309) float(0.038942933082581) float(0.035691499710083)
Output for 5.0.1
float(0.035609126091003) float(0.035684466362) float(0.035591006278992)
Output for 5.0.0
float(0.048727869987488) float(0.039021015167236) float(0.036804556846619)
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting ')' in /in/os5Gg on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting ')' in /in/os5Gg on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/os5Gg on line 8
Process exited with code 255.