3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test1() { $s = microtime(true); for ($i = 0; $i < 1000000; $i++) { } return microtime(true) - $s; } function test2() { $s = microtime(true); $i = 0; while ($i < 1000000) { $i++; } return microtime(true) - $s; } function test3() { $s = microtime(true); $i = 0; while ($i++ < 1000000) { } return microtime(true) - $s; } echo test1() . "\n\n"; echo test2() . "\n\n"; echo test3() . "\n\n";
Output for 7.1.0
0.013469934463501 0.012973070144653 0.0084269046783447
Output for 7.0.14
0.013515949249268 0.012980937957764 0.0083870887756348
Output for 7.0.6
0.011411905288696 0.010839939117432 0.0076529979705811
Output for 7.0.5
0.012535095214844 0.011713027954102 0.0079431533813477
Output for 7.0.4
0.0089559555053711 0.0088319778442383 0.006309986114502
Output for 7.0.3
0.011296987533569 0.010778903961182 0.0062661170959473
Output for 7.0.2
0.0079729557037354 0.0079731941223145 0.0052008628845215
Output for 7.0.1
0.0074260234832764 0.0074150562286377 0.0054590702056885
Output for 7.0.0
0.010423898696899 0.010144948959351 0.0067000389099121
Output for hhvm-3.12.0
0.046267986297607 0.043972969055176 0.033190965652466
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
0.045346021652222 0.024917840957642 0.020876169204712
Output for 5.6.21
0.030709981918335 0.022981882095337 0.020169019699097
Output for 5.6.20
0.022145986557007 0.017886161804199 0.016964912414551
Output for 5.6.19
0.027582883834839 0.02153205871582 0.018750905990601
Output for 5.6.18
0.029554128646851 0.022403001785278 0.019976854324341
Output for 5.6.17
0.030746936798096 0.023133993148804 0.020541906356812
Output for 5.6.16
0.032084941864014 0.024035930633545 0.020784854888916
Output for 5.6.15
0.021306037902832 0.017841815948486 0.016946077346802
Output for 5.6.14
0.031044006347656 0.02339506149292 0.022387027740479
Output for 5.6.13
0.02780294418335 0.017926931381226 0.017019033432007
Output for 5.6.12
0.030370950698853 0.023029088973999 0.020203828811646
Output for 5.6.11
0.025284051895142 0.019866943359375 0.017544984817505
Output for 5.6.10
0.031911849975586 0.023782968521118 0.020570039749146
Output for 5.6.9
0.020865917205811 0.017359972000122 0.016561985015869
Output for 5.6.8
0.030183076858521 0.022578954696655 0.019860029220581
Output for 5.6.7
0.021485090255737 0.017818927764893 0.016968011856079
Output for 5.5.35
0.030486106872559 0.022925853729248 0.020041942596436
Output for 5.5.34
0.020838022232056 0.018285989761353 0.016526937484741
Output for 5.5.33
0.021414041519165 0.017883062362671 0.01700496673584
Output for 5.5.32
0.03058385848999 0.022719144821167 0.020071029663086
Output for 5.5.31
0.027172803878784 0.019676208496094 0.020352125167847
Output for 5.5.30
0.025531053543091 0.017915010452271 0.016963958740234
Output for 5.5.29
0.028251886367798 0.021720886230469 0.019218921661377
Output for 5.5.28
0.029670000076294 0.022287130355835 0.018815994262695
Output for 5.5.27
0.031106948852539 0.019813060760498 0.017974853515625
Output for 5.5.26
0.021279096603394 0.017874002456665 0.016941070556641
Output for 5.5.25
0.021475076675415 0.017874002456665 0.016972064971924
Output for 5.5.24
0.026654958724976 0.02226185798645 0.017754077911377
Output for 5.4.45
0.031126976013184 0.027435064315796 0.023823976516724
Output for 5.4.44
0.04590106010437 0.030580997467041 0.030630111694336
Output for 5.4.43
0.02979588508606 0.024842977523804 0.022516965866089
Output for 5.4.42
0.029244899749756 0.025498867034912 0.025743007659912
Output for 5.4.41
0.030055999755859 0.025979995727539 0.024151086807251
Output for 5.4.40
0.029920816421509 0.025416135787964 0.022433996200562
Output for 5.4.39
0.028829097747803 0.024656057357788 0.022863149642944
Output for 5.4.38
0.033912181854248 0.0259690284729 0.030481100082397
Output for 5.4.37
0.029760837554932 0.02631688117981 0.022495031356812
Output for 5.4.36
0.034824132919312 0.02592396736145 0.023518800735474
Output for 5.4.35
0.030534982681274 0.042564868927002 0.024106979370117
Output for 5.4.34
0.031646966934204 0.028645992279053 0.023609161376953
Output for 5.4.32
0.022315979003906 0.019391059875488 0.017049074172974
Output for 5.4.31
0.022717952728271 0.018764019012451 0.017350912094116
Output for 5.4.30
0.021703958511353 0.019366025924683 0.017776012420654
Output for 5.4.29
0.022644996643066 0.019212007522583 0.026743173599243
Output for 5.4.28
0.031150102615356 0.027644157409668 0.026866912841797
Output for 5.4.27
0.031547069549561 0.028136968612671 0.027122020721436
Output for 5.4.26
0.054425001144409 0.034909963607788 0.027726888656616
Output for 5.4.25
0.031677007675171 0.028921127319336 0.023813009262085
Output for 5.4.24
0.030342102050781 0.05391788482666 0.041166067123413
Output for 5.4.23
0.030765056610107 0.024694919586182 0.024761199951172
Output for 5.4.22
0.031831979751587 0.027320861816406 0.027451038360596
Output for 5.4.21
0.031914949417114 0.04678201675415 0.025725126266479
Output for 5.4.20
0.041878938674927 0.048409938812256 0.034638166427612
Output for 5.4.19
0.036412954330444 0.032650947570801 0.029510021209717
Output for 5.4.18
0.043883085250854 0.028037071228027 0.026704072952271
Output for 5.4.17
0.030391931533813 0.027688026428223 0.024646997451782
Output for 5.4.16
0.030606031417847 0.029947996139526 0.030188083648682
Output for 5.4.15
0.035800933837891 0.033553123474121 0.026349067687988
Output for 5.4.14
0.032045125961304 0.033773899078369 0.023882150650024
Output for 5.4.13
0.03045392036438 0.027958869934082 0.024507999420166
Output for 5.4.12
0.034600019454956 0.028791904449463 0.031851053237915
Output for 5.4.11
0.030787944793701 0.032551050186157 0.023190975189209
Output for 5.4.10
0.030531883239746 0.02859902381897 0.024187088012695
Output for 5.4.9
0.033721923828125 0.029381036758423 0.024209022521973
Output for 5.4.8
0.033844947814941 0.027313947677612 0.024590015411377
Output for 5.4.7
0.030340909957886 0.02690315246582 0.024806976318359
Output for 5.4.6
0.050812005996704 0.031177997589111 0.024953842163086
Output for 5.4.5
0.051403045654297 0.027733087539673 0.026327133178711
Output for 5.4.4
0.032246112823486 0.029016017913818 0.023574113845825
Output for 5.4.3
0.036074876785278 0.034020185470581 0.028852939605713
Output for 5.4.2
0.037537097930908 0.032135963439941 0.03056788444519
Output for 5.4.1
0.039657115936279 0.034761190414429 0.029851913452148
Output for 5.4.0
0.036500930786133 0.033512115478516 0.030027151107788
Output for 5.3.29
0.029891014099121 0.025614023208618 0.023008108139038
Output for 5.3.28
0.046171903610229 0.044181108474731 0.038879871368408
Output for 5.3.27
0.054201126098633 0.048545122146606 0.040169954299927
Output for 5.3.26
0.057980060577393 0.046370029449463 0.049378871917725
Output for 5.3.25
0.064649105072021 0.045779943466187 0.039443969726562
Output for 5.3.24
0.047330856323242 0.069005966186523 0.027451038360596
Output for 5.3.23
0.043391942977905 0.033123970031738 0.030282020568848
Output for 5.3.22
0.044242143630981 0.039452075958252 0.037514925003052
Output for 5.3.21
0.04737377166748 0.067870855331421 0.051024913787842
Output for 5.3.20
0.038800001144409 0.038177013397217 0.034061908721924
Output for 5.3.19
0.037116050720215 0.028827905654907 0.02721905708313
Output for 5.3.18
0.045026779174805 0.037802934646606 0.025156021118164
Output for 5.3.17
0.035714864730835 0.028998851776123 0.024518966674805
Output for 5.3.16
0.031553030014038 0.027531147003174 0.024925947189331
Output for 5.3.15
0.037007093429565 0.03889012336731 0.026777982711792
Output for 5.3.14
0.036695957183838 0.039477109909058 0.030792951583862
Output for 5.3.13
0.031244039535522 0.026340007781982 0.033224105834961
Output for 5.3.12
0.031052112579346 0.02646803855896 0.023424863815308
Output for 5.3.11
0.0310959815979 0.02974009513855 0.024481058120728
Output for 5.3.10
0.031378984451294 0.027014017105103 0.024794101715088
Output for 5.3.9
0.03147292137146 0.028026819229126 0.037278890609741
Output for 5.3.8
0.032221078872681 0.0293869972229 0.026621103286743
Output for 5.3.7
0.043092012405396 0.038214921951294 0.032313823699951
Output for 5.3.6
0.045663118362427 0.037866115570068 0.033108949661255
Output for 5.3.5
0.064584970474243 0.071921110153198 0.035616874694824
Output for 5.3.4
0.046392917633057 0.040057897567749 0.035478115081787
Output for 5.3.3
0.042691946029663 0.037904024124146 0.036378860473633
Output for 5.3.2
0.048426866531372 0.058600902557373 0.06725811958313
Output for 5.3.1
0.08281421661377 0.057427167892456 0.031092882156372
Output for 5.3.0
0.042391061782837 0.038907051086426 0.034790992736816
Output for 5.2.17
0.049134969711304 0.06887412071228 0.054228067398071
Output for 5.2.16
0.049300193786621 0.039233922958374 0.075910091400146
Output for 5.2.15
0.094660997390747 0.067615032196045 0.059244155883789
Output for 5.2.14
0.06383490562439 0.051728963851929 0.052742958068848
Output for 5.2.13
0.064832925796509 0.064623117446899 0.059067964553833
Output for 5.2.12
0.077798128128052 0.068270921707153 0.060116052627563
Output for 5.2.11
0.087754011154175 0.07657790184021 0.057708978652954
Output for 5.2.10
0.10684490203857 0.065294027328491 0.05864405632019
Output for 5.2.9
0.073997974395752 0.066512823104858 0.081876039505005
Output for 5.2.8
0.067673921585083 0.064796209335327 0.05466103553772
Output for 5.2.7
0.062773942947388 0.057646036148071 0.05256199836731
Output for 5.2.6
0.043657064437866 0.039648771286011 0.034734964370728
Output for 5.2.5
0.041726112365723 0.038820028305054 0.052325010299683
Output for 5.2.4
0.085644006729126 0.068519115447998 0.058454990386963
Output for 5.2.3
0.079816102981567 0.064350843429565 0.06141185760498
Output for 5.2.2
0.073264122009277 0.065323829650879 0.072198867797852
Output for 5.2.1
0.072774171829224 0.067367076873779 0.087045907974243
Output for 5.2.0
0.16294193267822 0.10948991775513 0.0988929271698
Output for 5.1.6
0.12331604957581 0.066157102584839 0.058439016342163
Output for 5.1.5
0.083639860153198 0.076598882675171 0.055454969406128
Output for 5.1.4
0.071856021881104 0.064513921737671 0.050266027450562
Output for 5.1.3
0.044157981872559 0.039218187332153 0.034816980361938
Output for 5.1.2
0.054619073867798 0.039917945861816 0.035778045654297
Output for 5.1.1
0.053492069244385 0.055683851242065 0.049162864685059
Output for 5.1.0
0.043915987014771 0.041967153549194 0.03796911239624
Output for 5.0.5
0.17788195610046 0.1347861289978 0.15587401390076
Output for 5.0.4
0.21808791160583 0.19784617424011 0.14980792999268
Output for 5.0.3
0.18198013305664 0.17583513259888 0.1067259311676
Output for 5.0.2
0.15739107131958 0.16774916648865 0.1063768863678
Output for 5.0.1
0.16725897789001 0.23769807815552 0.14115500450134
Output for 5.0.0
0.18141508102417 0.16986393928528 0.16122794151306
Output for 4.4.9
-0.871743 0.127246 0.135391
Output for 4.4.8
0.155074 0.099062 0.082998
Output for 4.4.7
0.13592 0.093266 -0.90425
Output for 4.4.6
0.190727 0.14951 0.094276
Output for 4.4.5
0.180549 0.163659 0.117352
Output for 4.4.4
0.182897 0.167527 0.148952
Output for 4.4.3
0.165277 0.162878 -0.907379
Output for 4.4.2
0.113228 0.105236 0.074266
Output for 4.4.1
0.099712 0.166064 0.081525
Output for 4.4.0
0.153042 -0.846251 0.108462
Output for 4.3.11
0.110947 0.126457 0.105704
Output for 4.3.10
0.182903 0.16685 -0.837256
Output for 4.3.9
0.1374 0.174002 0.087053
Output for 4.3.8
0.156924 0.146025 0.10574
Output for 4.3.7
0.145914 0.152211 0.119512
Output for 4.3.6
0.173995 0.165755 0.123388
Output for 4.3.5
0.156722 0.117129 0.084381
Output for 4.3.4
0.105322 0.09977 0.089836
Output for 4.3.3
0.175675 -0.83695 0.116025
Output for 4.3.2
0.162477 0.147965 0.115775
Output for 4.3.1
0.161682 0.138071 -0.928326
Output for 4.3.0
0.073073 0.071232 0.054614