3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $r = [0,0,0]; $range = 100000; $c = range(0,$range-1); for($a = 0;$a < 10;$a++){ $t = microtime(true); for($i = 1;++$i < $range;)$i; $r[0] += microtime(true) - $t; $t = microtime(true); foreach($c as $i)$i; $r[1] += microtime(true) - $t; $t = microtime(true); $i = 0; while(++$i < $range)$i; $r[2] += microtime(true) - $t; } var_dump($r);
Output for 7.1.0
array(3) { [0]=> float(0.0092477798461914) [1]=> float(0.010426044464111) [2]=> float(0.0092360973358154) }
Output for 7.0.14
array(3) { [0]=> float(0.010091543197632) [1]=> float(0.010034322738647) [2]=> float(0.010058164596558) }
Output for 7.0.6
array(3) { [0]=> float(0.009007453918457) [1]=> float(0.0079915523529053) [2]=> float(0.008760929107666) }
Output for 7.0.5
array(3) { [0]=> float(0.010242938995361) [1]=> float(0.012228965759277) [2]=> float(0.010434627532959) }
Output for 7.0.4
array(3) { [0]=> float(0.0071990489959717) [1]=> float(0.0076577663421631) [2]=> float(0.0070879459381104) }
Output for 7.0.3
array(3) { [0]=> float(0.0077676773071289) [1]=> float(0.0082406997680664) [2]=> float(0.0077197551727295) }
Output for 7.0.2
array(3) { [0]=> float(0.0058462619781494) [1]=> float(0.0062341690063477) [2]=> float(0.0059719085693359) }
Output for 7.0.1
array(3) { [0]=> float(0.0057995319366455) [1]=> float(0.0062048435211182) [2]=> float(0.0058577060699463) }
Output for 7.0.0
array(3) { [0]=> float(0.0091419219970703) [1]=> float(0.0091938972473145) [2]=> float(0.0090494155883789) }
Output for hhvm-3.12.0
array(3) { [0]=> float(0.036746025085449) [1]=> float(0.027846574783325) [2]=> float(0.03638219833374) }
Output for hhvm-3.10.0
array(3) { [0]=> float(0.041348457336426) [1]=> float(0.036071300506592) [2]=> float(0.040810346603394) }
Output for 5.6.28
array(3) { [0]=> float(0.030161619186401) [1]=> float(0.035898685455322) [2]=> float(0.022988557815552) }
Output for 5.6.21
array(3) { [0]=> float(0.022817611694336) [1]=> float(0.023543119430542) [2]=> float(0.01784610748291) }
Output for 5.6.20
array(3) { [0]=> float(0.022297143936157) [1]=> float(0.024128913879395) [2]=> float(0.017543077468872) }
Output for 5.6.19
array(3) { [0]=> float(0.023241996765137) [1]=> float(0.024112939834595) [2]=> float(0.017603874206543) }
Output for 5.6.18
array(3) { [0]=> float(0.038469076156616) [1]=> float(0.037518262863159) [2]=> float(0.028802156448364) }
Output for 5.6.17
array(3) { [0]=> float(0.026553392410278) [1]=> float(0.02760910987854) [2]=> float(0.020444869995117) }
Output for 5.6.16
array(3) { [0]=> float(0.021629810333252) [1]=> float(0.022829532623291) [2]=> float(0.017062425613403) }
Output for 5.6.15
array(3) { [0]=> float(0.021751880645752) [1]=> float(0.022926807403564) [2]=> float(0.016953229904175) }
Output for 5.6.14
array(3) { [0]=> float(0.022266626358032) [1]=> float(0.023227214813232) [2]=> float(0.017481088638306) }
Output for 5.6.13
array(3) { [0]=> float(0.024889230728149) [1]=> float(0.027836084365845) [2]=> float(0.020190000534058) }
Output for 5.6.12
array(3) { [0]=> float(0.022264719009399) [1]=> float(0.024328708648682) [2]=> float(0.017575979232788) }
Output for 5.6.11
array(3) { [0]=> float(0.023372411727905) [1]=> float(0.023855209350586) [2]=> float(0.018256187438965) }
Output for 5.6.10
array(3) { [0]=> float(0.022357225418091) [1]=> float(0.023532867431641) [2]=> float(0.017626523971558) }
Output for 5.6.9
array(3) { [0]=> float(0.029485940933228) [1]=> float(0.029182195663452) [2]=> float(0.02261209487915) }
Output for 5.6.8
array(3) { [0]=> float(0.026848793029785) [1]=> float(0.027318477630615) [2]=> float(0.020361185073853) }
Output for 5.6.7
array(3) { [0]=> float(0.022216081619263) [1]=> float(0.024637460708618) [2]=> float(0.017374277114868) }
Output for 5.5.35
array(3) { [0]=> float(0.026217937469482) [1]=> float(0.034883499145508) [2]=> float(0.023329973220825) }
Output for 5.5.34
array(3) { [0]=> float(0.022815465927124) [1]=> float(0.024636268615723) [2]=> float(0.018323183059692) }
Output for 5.5.33
array(3) { [0]=> float(0.02844500541687) [1]=> float(0.029861211776733) [2]=> float(0.022287130355835) }
Output for 5.5.32
array(3) { [0]=> float(0.026738166809082) [1]=> float(0.033279657363892) [2]=> float(0.022337675094604) }
Output for 5.5.31
array(3) { [0]=> float(0.024269342422485) [1]=> float(0.026070594787598) [2]=> float(0.019606828689575) }
Output for 5.5.30
array(3) { [0]=> float(0.022821187973022) [1]=> float(0.025456190109253) [2]=> float(0.01832914352417) }
Output for 5.5.29
array(3) { [0]=> float(0.030110120773315) [1]=> float(0.031124353408813) [2]=> float(0.023027181625366) }
Output for 5.5.28
array(3) { [0]=> float(0.02223539352417) [1]=> float(0.026914834976196) [2]=> float(0.018369913101196) }
Output for 5.5.27
array(3) { [0]=> float(0.028372287750244) [1]=> float(0.030109882354736) [2]=> float(0.023125171661377) }
Output for 5.5.26
array(3) { [0]=> float(0.0278000831604) [1]=> float(0.028821468353271) [2]=> float(0.021830081939697) }
Output for 5.5.25
array(3) { [0]=> float(0.028183698654175) [1]=> float(0.02971625328064) [2]=> float(0.022183418273926) }
Output for 5.5.24
array(3) { [0]=> float(0.02791690826416) [1]=> float(0.028862714767456) [2]=> float(0.022920370101929) }
Output for 5.4.45
array(3) { [0]=> float(0.033321380615234) [1]=> float(0.049264907836914) [2]=> float(0.029801845550537) }
Output for 5.4.44
array(3) { [0]=> float(0.035755634307861) [1]=> float(0.047559976577759) [2]=> float(0.028825283050537) }
Output for 5.4.43
array(3) { [0]=> float(0.042367219924927) [1]=> float(0.06411600112915) [2]=> float(0.043471574783325) }
Output for 5.4.42
array(3) { [0]=> float(0.034766912460327) [1]=> float(0.041893243789673) [2]=> float(0.027634382247925) }
Output for 5.4.41
array(3) { [0]=> float(0.032167196273804) [1]=> float(0.046162366867065) [2]=> float(0.025375127792358) }
Output for 5.4.40
array(3) { [0]=> float(0.031862258911133) [1]=> float(0.041059494018555) [2]=> float(0.026182651519775) }
Output for 5.4.39
array(3) { [0]=> float(0.035983085632324) [1]=> float(0.042068004608154) [2]=> float(0.026090145111084) }
Output for 5.4.38
array(3) { [0]=> float(0.033212900161743) [1]=> float(0.046142578125) [2]=> float(0.027544021606445) }
Output for 5.4.37
array(3) { [0]=> float(0.026205778121948) [1]=> float(0.03283166885376) [2]=> float(0.021133422851562) }
Output for 5.4.36
array(3) { [0]=> float(0.032467365264893) [1]=> float(0.038733720779419) [2]=> float(0.029060840606689) }
Output for 5.4.35
array(3) { [0]=> float(0.034273147583008) [1]=> float(0.042625665664673) [2]=> float(0.030142068862915) }
Output for 5.4.34
array(3) { [0]=> float(0.025169849395752) [1]=> float(0.029279708862305) [2]=> float(0.021329164505005) }
Output for 5.4.32
array(3) { [0]=> float(0.026268720626831) [1]=> float(0.028450012207031) [2]=> float(0.019208908081055) }
Output for 5.4.31
array(3) { [0]=> float(0.02371621131897) [1]=> float(0.028288602828979) [2]=> float(0.018936395645142) }
Output for 5.4.30
array(3) { [0]=> float(0.026320934295654) [1]=> float(0.029918432235718) [2]=> float(0.020783662796021) }
Output for 5.4.29
array(3) { [0]=> float(0.023282766342163) [1]=> float(0.027487993240356) [2]=> float(0.018850326538086) }
Output for 5.4.28
array(3) { [0]=> float(0.024658679962158) [1]=> float(0.028881788253784) [2]=> float(0.019717931747437) }
Output for 5.4.27
array(3) { [0]=> float(0.023959875106812) [1]=> float(0.030089855194092) [2]=> float(0.019070148468018) }
Output for 5.4.26
array(3) { [0]=> float(0.025154829025269) [1]=> float(0.03086256980896) [2]=> float(0.019827127456665) }
Output for 5.4.25
array(3) { [0]=> float(0.023977994918823) [1]=> float(0.028738737106323) [2]=> float(0.019527196884155) }
Output for 5.4.24
array(3) { [0]=> float(0.023990154266357) [1]=> float(0.028308153152466) [2]=> float(0.019061803817749) }
Output for 5.4.23
array(3) { [0]=> float(0.023683071136475) [1]=> float(0.028620004653931) [2]=> float(0.020694494247437) }
Output for 5.4.22
array(3) { [0]=> float(0.023805141448975) [1]=> float(0.029194831848145) [2]=> float(0.019663333892822) }
Output for 5.4.21
array(3) { [0]=> float(0.12939023971558) [1]=> float(0.038257122039795) [2]=> float(0.026434659957886) }
Output for 5.4.20
array(3) { [0]=> float(0.048804759979248) [1]=> float(0.037559509277344) [2]=> float(0.032682657241821) }
Output for 5.4.19
array(3) { [0]=> float(0.03858494758606) [1]=> float(0.035070419311523) [2]=> float(0.023886203765869) }
Output for 5.4.18
array(3) { [0]=> float(0.037147283554077) [1]=> float(0.041849374771118) [2]=> float(0.026710271835327) }
Output for 5.4.17
array(3) { [0]=> float(0.04153299331665) [1]=> float(0.039138078689575) [2]=> float(0.025090217590332) }
Output for 5.4.16
array(3) { [0]=> float(0.045725584030151) [1]=> float(0.03671407699585) [2]=> float(0.11730313301086) }
Output for 5.4.15
array(3) { [0]=> float(0.048007249832153) [1]=> float(0.044344902038574) [2]=> float(0.029365301132202) }
Output for 5.4.14
array(3) { [0]=> float(0.038091421127319) [1]=> float(0.033225774765015) [2]=> float(0.026105642318726) }
Output for 5.4.13
array(3) { [0]=> float(0.036877632141113) [1]=> float(0.034111738204956) [2]=> float(0.024044752120972) }
Output for 5.4.12
array(3) { [0]=> float(0.075874805450439) [1]=> float(0.040369987487793) [2]=> float(0.025629997253418) }
Output for 5.4.11
array(3) { [0]=> float(0.03922176361084) [1]=> float(0.03614616394043) [2]=> float(0.024458169937134) }
Output for 5.4.10
array(3) { [0]=> float(0.049700975418091) [1]=> float(0.039688348770142) [2]=> float(0.030579090118408) }
Output for 5.4.9
array(3) { [0]=> float(0.041024684906006) [1]=> float(0.034656763076782) [2]=> float(0.025053977966309) }
Output for 5.4.8
array(3) { [0]=> float(0.057469129562378) [1]=> float(0.043124198913574) [2]=> float(0.13399481773376) }
Output for 5.4.7
array(3) { [0]=> float(0.045204162597656) [1]=> float(0.097507953643799) [2]=> float(0.029736995697021) }
Output for 5.4.6
array(3) { [0]=> float(0.044856786727905) [1]=> float(0.036334991455078) [2]=> float(0.024643182754517) }
Output for 5.4.5
array(3) { [0]=> float(0.043936729431152) [1]=> float(0.043447732925415) [2]=> float(0.028660774230957) }
Output for 5.4.4
array(3) { [0]=> float(0.039583206176758) [1]=> float(0.034200429916382) [2]=> float(0.025834798812866) }
Output for 5.4.3
array(3) { [0]=> float(0.046924352645874) [1]=> float(0.037680149078369) [2]=> float(0.025143146514893) }
Output for 5.4.2
array(3) { [0]=> float(0.047732353210449) [1]=> float(0.037216186523438) [2]=> float(0.023636817932129) }
Output for 5.4.1
array(3) { [0]=> float(0.11242985725403) [1]=> float(0.039962530136108) [2]=> float(0.026522159576416) }
Output for 5.4.0
array(3) { [0]=> float(0.047485828399658) [1]=> float(0.037646293640137) [2]=> float(0.027737855911255) }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/8UI8f on line 2
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 '[' in /in/8UI8f on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/8UI8f on line 2
Process exited with code 255.