3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo {} function f0($foo) {} function f1(Foo $foo) {} function f2(Foo $foo = null) {} $calls = 100000; $avg = 10; $m = array(); for ($j = 0; $j < $avg; $j++) { $start = microtime(true); for ($i = 0; $i < $calls; $i++) { f0(new 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(new 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(new Foo()); } $m[] = microtime(true) - $start; } var_dump(array_sum($m) / $avg);
Output for 7.1.0
float(0.0062959909439087) float(0.0072772026062012) float(0.0085931062698364)
Output for 7.0.14
float(0.011716604232788) float(0.012013506889343) float(0.0017220973968506)
Output for 7.0.10
float(0.0066267728805542) float(0.0068007469177246) float(0.0063153743743896)
Output for 7.0.9
float(0.0068145036697388) float(0.0075760841369629) float(0.0073756217956543)
Output for 7.0.8
float(0.0095793724060059) float(0.008475923538208) float(0.0077406644821167)
Output for 7.0.7
float(0.0083370923995972) float(0.0076636075973511) float(0.0083420991897583)
Output for 7.0.6
float(0.0074326753616333) float(0.0085662126541138) float(0.0085713148117065)
Output for 7.0.5
float(0.0079765796661377) float(0.0074513912200928) float(0.0074446678161621)
Output for 7.0.4
float(0.012178325653076) float(0.0093014240264893) float(0.0074560880661011)
Output for 7.0.3
float(0.0076019763946533) float(0.0075566291809082) float(0.0075614929199219)
Output for 7.0.2
float(0.0067852020263672) float(0.0068047285079956) float(0.006159496307373)
Output for 7.0.1
float(0.0074875116348267) float(0.0074723243713379) float(0.0076765775680542)
Output for 7.0.0
float(0.0072479248046875) float(0.0078984260559082) float(0.0087045907974243)
Output for 5.6.25
float(0.013670325279236) float(0.024997591972351) float(0.024234914779663)
Output for 5.6.24
float(0.016643142700195) float(0.020209193229675) float(0.020019316673279)
Output for 5.6.23
float(0.017511391639709) float(0.024350357055664) float(0.024330973625183)
Output for 5.6.22
float(0.01944100856781) float(0.026136922836304) float(0.026114463806152)
Output for 5.6.21
float(0.016803932189941) float(0.024300265312195) float(0.024522495269775)
Output for 5.6.20
float(0.018650937080383) float(0.024397659301758) float(0.02480320930481)
Output for 5.6.19
float(0.015408372879028) float(0.024506950378418) float(0.021180176734924)
Output for 5.6.18
float(0.02273120880127) float(0.021550679206848) float(0.020377659797668)
Output for 5.6.17
float(0.018270444869995) float(0.024140572547913) float(0.024639010429382)
Output for 5.6.16
float(0.016071152687073) float(0.024374485015869) float(0.02449779510498)
Output for 5.6.15
float(0.018450522422791) float(0.024142909049988) float(0.0244704246521)
Output for 5.6.14
float(0.01918580532074) float(0.024354028701782) float(0.024666786193848)
Output for 5.6.13
float(0.016642332077026) float(0.024455809593201) float(0.024719262123108)
Output for 5.6.12
float(0.021609711647034) float(0.024485325813293) float(0.024709105491638)
Output for 5.6.11
float(0.018779873847961) float(0.026956653594971) float(0.025900793075562)
Output for 5.6.10
float(0.022695302963257) float(0.024731707572937) float(0.02482008934021)
Output for 5.6.9
float(0.023629951477051) float(0.025298166275024) float(0.025009560585022)
Output for 5.6.8
float(0.021697688102722) float(0.024838018417358) float(0.025148415565491)
Output for 5.6.7
float(0.017200803756714) float(0.024738526344299) float(0.024646186828613)
Output for 5.6.6
float(0.015320587158203) float(0.02403838634491) float(0.020414614677429)
Output for 5.6.5
float(0.018822383880615) float(0.029929780960083) float(0.024592137336731)
Output for 5.6.4
float(0.019339036941528) float(0.029395484924316) float(0.024010872840881)
Output for 5.6.3
float(0.016197729110718) float(0.023267793655396) float(0.023006010055542)
Output for 5.6.2
float(0.016430163383484) float(0.024393200874329) float(0.024450755119324)
Output for 5.6.1
float(0.015697526931763) float(0.024424767494202) float(0.024313306808472)
Output for 5.6.0
float(0.013327789306641) float(0.020669317245483) float(0.020134902000427)
Output for 5.5.38
float(0.01256263256073) float(0.020586490631104) float(0.020604395866394)
Output for 5.5.37
float(0.016728019714355) float(0.025440120697021) float(0.025448560714722)
Output for 5.5.36
float(0.021464800834656) float(0.024872255325317) float(0.024690222740173)
Output for 5.5.35
float(0.018954300880432) float(0.025168299674988) float(0.025184392929077)
Output for 5.5.34
float(0.017471528053284) float(0.025976634025574) float(0.025952124595642)
Output for 5.5.33
float(0.015978789329529) float(0.025240182876587) float(0.023979115486145)
Output for 5.5.32
float(0.018082404136658) float(0.025516819953918) float(0.025648975372314)
Output for 5.5.31
float(0.017026805877686) float(0.025387358665466) float(0.025327897071838)
Output for 5.5.30
float(0.015584921836853) float(0.02567503452301) float(0.024837779998779)
Output for 5.5.29
float(0.019106292724609) float(0.025120449066162) float(0.025305247306824)
Output for 5.5.28
float(0.016278696060181) float(0.025978088378906) float(0.025908446311951)
Output for 5.5.27
float(0.016705822944641) float(0.023972153663635) float(0.02385733127594)
Output for 5.5.26
float(0.018727922439575) float(0.026916074752808) float(0.025361108779907)
Output for 5.5.25
float(0.016786193847656) float(0.025766372680664) float(0.024700689315796)
Output for 5.5.24
float(0.016248822212219) float(0.025459599494934) float(0.025531411170959)
Output for 5.5.23
float(0.016274809837341) float(0.029056262969971) float(0.020844268798828)
Output for 5.5.22
float(0.017227411270142) float(0.028125786781311) float(0.030546474456787)
Output for 5.5.21
float(0.01728835105896) float(0.026387763023376) float(0.026266360282898)
Output for 5.5.20
float(0.019252181053162) float(0.024935126304626) float(0.025488996505737)
Output for 5.5.19
float(0.018929409980774) float(0.027250838279724) float(0.025371813774109)
Output for 5.5.18
float(0.015748167037964) float(0.024993085861206) float(0.024742460250854)
Output for 5.5.16
float(0.015677714347839) float(0.023398208618164) float(0.020658183097839)
Output for 5.5.15
float(0.019384765625) float(0.021282815933228) float(0.020756888389587)
Output for 5.5.14
float(0.01868302822113) float(0.021007633209229) float(0.020643901824951)
Output for 5.5.13
float(0.02172703742981) float(0.02581992149353) float(0.025456166267395)
Output for 5.5.12
float(0.022373580932617) float(0.025149440765381) float(0.025051784515381)
Output for 5.5.11
float(0.022158885002136) float(0.024940991401672) float(0.024546885490417)
Output for 5.5.10
float(0.017531728744507) float(0.025565576553345) float(0.025786018371582)
Output for 5.5.9
float(0.015772676467896) float(0.025175619125366) float(0.024820756912231)
Output for 5.5.8
float(0.016477298736572) float(0.025452303886414) float(0.025640416145325)
Output for 5.5.7
float(0.018344378471375) float(0.025360989570618) float(0.025280904769897)
Output for 5.5.6
float(0.016938138008118) float(0.025221705436707) float(0.025055980682373)
Output for 5.5.5
float(0.02053759098053) float(0.025060486793518) float(0.024959921836853)
Output for 5.5.4
float(0.024195647239685) float(0.026498937606812) float(0.027056860923767)
Output for 5.5.3
float(0.018847632408142) float(0.025784492492676) float(0.025715374946594)
Output for 5.5.2
float(0.015899181365967) float(0.025979471206665) float(0.023112964630127)
Output for 5.5.1
float(0.016784620285034) float(0.025356388092041) float(0.025273203849792)
Output for 5.5.0
float(0.017949604988098) float(0.025837588310242) float(0.025940275192261)
Output for 5.4.45
float(0.017576551437378) float(0.025955057144165) float(0.025821495056152)
Output for 5.4.44
float(0.019181680679321) float(0.030550670623779) float(0.029402732849121)
Output for 5.4.43
float(0.018100929260254) float(0.027898335456848) float(0.028102493286133)
Output for 5.4.42
float(0.016414165496826) float(0.021299529075623) float(0.021329212188721)
Output for 5.4.41
float(0.016796016693115) float(0.025708675384521) float(0.026202416419983)
Output for 5.4.40
float(0.018974685668945) float(0.02510142326355) float(0.024917006492615)
Output for 5.4.39
float(0.017647099494934) float(0.0255539894104) float(0.025352144241333)
Output for 5.4.38
float(0.018053340911865) float(0.021426248550415) float(0.021044206619263)
Output for 5.4.37
float(0.017228007316589) float(0.02594838142395) float(0.026047396659851)
Output for 5.4.36
float(0.021842789649963) float(0.025641369819641) float(0.025519919395447)
Output for 5.4.35
float(0.018339514732361) float(0.02559700012207) float(0.025491666793823)
Output for 5.4.34
float(0.013841128349304) float(0.021024918556213) float(0.021076202392578)
Output for 5.4.32
float(0.012988901138306) float(0.021001505851746) float(0.021151804924011)
Output for 5.4.31
float(0.014072012901306) float(0.021139693260193) float(0.021319246292114)
Output for 5.4.30
float(0.017322444915771) float(0.025470471382141) float(0.02540078163147)
Output for 5.4.29
float(0.018607449531555) float(0.027411103248596) float(0.026138639450073)
Output for 5.4.28
float(0.018632912635803) float(0.025317716598511) float(0.025320410728455)
Output for 5.4.27
float(0.01830198764801) float(0.025377655029297) float(0.025716400146484)
Output for 5.4.26
float(0.017507481575012) float(0.025792789459229) float(0.025491094589233)
Output for 5.4.25
float(0.01575038433075) float(0.025684428215027) float(0.024108815193176)
Output for 5.4.24
float(0.01800901889801) float(0.027335691452026) float(0.027377128601074)
Output for 5.4.23
float(0.018728542327881) float(0.025569796562195) float(0.025415992736816)
Output for 5.4.22
float(0.017287731170654) float(0.030117297172546) float(0.028255128860474)
Output for 5.4.21
float(0.013378739356995) float(0.020979285240173) float(0.021379709243774)
Output for 5.4.20
float(0.0186527967453) float(0.025442481040955) float(0.025496888160706)
Output for 5.4.19
float(0.018587398529053) float(0.02551007270813) float(0.025343632698059)
Output for 5.4.18
float(0.016283631324768) float(0.025977158546448) float(0.025951147079468)
Output for 5.4.17
float(0.018666219711304) float(0.021730160713196) float(0.021329617500305)
Output for 5.4.16
float(0.021126627922058) float(0.032140254974365) float(0.027138686180115)
Output for 5.4.15
float(0.01757800579071) float(0.025531840324402) float(0.025542306900024)
Output for 5.4.14
float(0.022932982444763) float(0.025531029701233) float(0.025221705436707)
Output for 5.4.13
float(0.019029307365417) float(0.0249920129776) float(0.024367713928223)
Output for 5.4.12
float(0.018615984916687) float(0.025347971916199) float(0.025144004821777)
Output for 5.4.11
float(0.018310594558716) float(0.025192141532898) float(0.025637745857239)
Output for 5.4.10
float(0.016098999977112) float(0.025521540641785) float(0.026172351837158)
Output for 5.4.9
float(0.019614386558533) float(0.021949291229248) float(0.021215319633484)
Output for 5.4.8
float(0.016225934028625) float(0.027783703804016) float(0.027056336402893)
Output for 5.4.7
float(0.018543648719788) float(0.02585871219635) float(0.025863599777222)
Output for 5.4.6
float(0.018258619308472) float(0.025760221481323) float(0.025424981117249)
Output for 5.4.5
float(0.017692971229553) float(0.025405430793762) float(0.02552649974823)
Output for 5.4.4
float(0.017978453636169) float(0.02536199092865) float(0.025268912315369)
Output for 5.4.3
float(0.018477988243103) float(0.025248336791992) float(0.025445604324341)
Output for 5.4.2
float(0.015518498420715) float(0.021607089042664) float(0.021080470085144)
Output for 5.4.1
float(0.016327428817749) float(0.025451421737671) float(0.025155210494995)
Output for 5.4.0
float(0.01832799911499) float(0.021481370925903) float(0.020945382118225)
Output for 5.3.29
float(0.035397434234619) float(0.030850195884705) float(0.031061363220215)
Output for 5.3.28
float(0.036334180831909) float(0.038198232650757) float(0.032427549362183)
Output for 5.3.27
float(0.041255974769592) float(0.039320921897888) float(0.033388781547546)
Output for 5.3.26
float(0.038721799850464) float(0.039777708053589) float(0.03206148147583)
Output for 5.3.25
float(0.038175010681152) float(0.037954378128052) float(0.035587382316589)
Output for 5.3.24
float(0.035410261154175) float(0.038447952270508) float(0.033964920043945)
Output for 5.3.23
float(0.037376022338867) float(0.041062903404236) float(0.034442639350891)
Output for 5.3.22
float(0.038436079025269) float(0.039022898674011) float(0.035825824737549)
Output for 5.3.21
float(0.036828351020813) float(0.039511132240295) float(0.03274393081665)
Output for 5.3.20
float(0.04137909412384) float(0.038592457771301) float(0.036498761177063)
Output for 5.3.19
float(0.034763216972351) float(0.033648753166199) float(0.031704807281494)
Output for 5.3.18
float(0.037550163269043) float(0.038269305229187) float(0.035762500762939)
Output for 5.3.17
float(0.035923647880554) float(0.037755107879639) float(0.031938862800598)
Output for 5.3.16
float(0.036932921409607) float(0.038630342483521) float(0.035638284683228)
Output for 5.3.15
float(0.038202667236328) float(0.038490629196167) float(0.035511589050293)
Output for 5.3.14
float(0.037663960456848) float(0.034693551063538) float(0.037649178504944)
Output for 5.3.13
float(0.03319251537323) float(0.038554310798645) float(0.037241721153259)
Output for 5.3.12
float(0.035461926460266) float(0.038630127906799) float(0.03211498260498)
Output for 5.3.11
float(0.02879650592804) float(0.032192468643188) float(0.032004237174988)
Output for 5.3.10
float(0.037450122833252) float(0.03810498714447) float(0.034724903106689)
Output for 5.3.9
float(0.035215854644775) float(0.031629967689514) float(0.031681323051453)
Output for 5.3.8
float(0.036241030693054) float(0.037775206565857) float(0.03318042755127)
Output for 5.3.7
float(0.03614649772644) float(0.039074087142944) float(0.034961557388306)
Output for 5.3.6
float(0.03719265460968) float(0.039148044586182) float(0.03410427570343)
Output for 5.3.5
float(0.037249445915222) float(0.039078783988953) float(0.033346581459045)
Output for 5.3.4
float(0.039034533500671) float(0.039277625083923) float(0.034964680671692)
Output for 5.3.3
float(0.03877854347229) float(0.039331269264221) float(0.035304236412048)
Output for 5.3.2
float(0.038422083854675) float(0.038885116577148) float(0.03649570941925)
Output for 5.3.1
float(0.039061427116394) float(0.039098501205444) float(0.036888670921326)
Output for 5.3.0
float(0.03856406211853) float(0.038864898681641) float(0.035495805740356)
Output for 5.2.17
float(0.04186851978302) float(0.047639799118042) float(0.039829921722412)
Output for 5.2.16
float(0.035825681686401) float(0.039539647102356) float(0.040362286567688)
Output for 5.2.15
float(0.040315842628479) float(0.047578001022339) float(0.039884686470032)
Output for 5.2.14
float(0.037347221374512) float(0.045736861228943) float(0.044762110710144)
Output for 5.2.13
float(0.039920163154602) float(0.046354556083679) float(0.039493227005005)
Output for 5.2.12
float(0.044393849372864) float(0.048764514923096) float(0.040448975563049)
Output for 5.2.11
float(0.042489004135132) float(0.047868824005127) float(0.041142845153809)
Output for 5.2.10
float(0.040822458267212) float(0.046308016777039) float(0.039857721328735)
Output for 5.2.9
float(0.041410136222839) float(0.047010970115662) float(0.03969931602478)
Output for 5.2.8
float(0.042025780677795) float(0.047244119644165) float(0.039914441108704)
Output for 5.2.7
float(0.042363405227661) float(0.049034810066223) float(0.039993476867676)
Output for 5.2.6
float(0.05034236907959) float(0.051814556121826) float(0.047662901878357)
Output for 5.2.5
float(0.043967890739441) float(0.046479058265686) float(0.040711283683777)
Output for 5.2.4
float(0.040243792533875) float(0.047625732421875) float(0.040218186378479)
Output for 5.2.3
float(0.038331294059753) float(0.051777529716492) float(0.048682117462158)
Output for 5.2.2
float(0.042768883705139) float(0.048349118232727) float(0.040051364898682)
Output for 5.2.1
float(0.041383719444275) float(0.048259615898132) float(0.039709401130676)
Output for 5.2.0
float(0.042089676856995) float(0.047534394264221) float(0.039284205436707)
Output for 5.1.6
float(0.038659262657166) float(0.043699383735657) float(0.037532091140747)
Output for 5.1.5
float(0.043784618377686) float(0.050565528869629) float(0.04233295917511)
Output for 5.1.4
float(0.041074156761169) float(0.045904183387756) float(0.039832663536072)
Output for 5.1.3
float(0.041973662376404) float(0.044608116149902) float(0.037583017349243)
Output for 5.1.2
float(0.040323162078857) float(0.045131039619446) float(0.038165378570557)
Output for 5.1.1
float(0.039215970039368) float(0.044209003448486) float(0.037374830245972)
Output for 5.1.0
float(0.041944146156311) float(0.046054077148438) float(0.04069664478302)
Output for 5.0.5
float(0.056348562240601) float(0.053130912780762) float(0.045802640914917)
Output for 5.0.4
float(0.049829912185669) float(0.04529185295105) float(0.045445656776428)
Output for 5.0.3
float(0.045174956321716) float(0.044275403022766) float(0.044190311431885)
Output for 5.0.2
float(0.042482113838196) float(0.04465970993042) float(0.044815111160278)
Output for 5.0.1
float(0.046496415138245) float(0.046039843559265) float(0.04594898223877)
Output for 5.0.0
float(0.049503612518311) float(0.052056789398193) float(0.052698087692261)
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting ')' in /in/5rCcp on line 5
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/5rCcp on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/5rCcp on line 5
Process exited with code 255.