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; } function test4() { $s = microtime(true); for ($i = 0; $i < 1000000; $i++); return microtime(true) - $s; } function test5() { $s = microtime(true); $i = 0; while ($i++ < 1000000); return microtime(true) - $s; } echo test1() . "\n\n"; echo test2() . "\n\n"; echo test3() . "\n\n"; echo test4() . "\n\n"; echo test5() . "\n\n";
Output for 7.1.0
0.013806104660034 0.013062953948975 0.008430004119873 0.012127876281738 0.0080230236053467
Output for 7.0.14
0.013840913772583 0.013336896896362 0.0095479488372803 0.011976003646851 0.0089700222015381
Output for 7.0.6
0.0078990459442139 0.007936954498291 0.0055980682373047 0.007824182510376 0.0057311058044434
Output for 7.0.5
0.0077459812164307 0.0079619884490967 0.0058770179748535 0.0071878433227539 0.005734920501709
Output for 7.0.4
0.009861946105957 0.0099141597747803 0.0066320896148682 0.0096580982208252 0.0058679580688477
Output for 7.0.3
0.010985851287842 0.010635137557983 0.0068140029907227 0.010003089904785 0.0063400268554688
Output for 7.0.2
0.0090129375457764 0.0091171264648438 0.0068509578704834 0.0088620185852051 0.006425142288208
Output for 7.0.1
0.011139154434204 0.0089831352233887 0.0066721439361572 0.0087940692901611 0.0062768459320068
Output for 7.0.0
0.0079789161682129 0.0096399784088135 0.0052311420440674 0.0074059963226318 0.005216121673584
Output for 5.6.28
0.055346012115479 0.024986028671265 0.020214080810547 0.037703990936279 0.017626047134399
Output for 5.6.21
0.024205923080444 0.018012046813965 0.0173659324646 0.021326065063477 0.020012855529785
Output for 5.6.20
0.028418779373169 0.02185583114624 0.019410133361816 0.022698163986206 0.017113924026489
Output for 5.6.19
0.031718015670776 0.023484945297241 0.02059006690979 0.023867130279541 0.017791986465454
Output for 5.6.18
0.021553993225098 0.017857074737549 0.016963005065918 0.021363019943237 0.017009973526001
Output for 5.6.17
0.021318912506104 0.017976999282837 0.016935110092163 0.021299839019775 0.016949892044067
Output for 5.6.16
0.02393102645874 0.018563985824585 0.017087936401367 0.021593809127808 0.01708197593689
Output for 5.6.15
0.02820897102356 0.021496057510376 0.018960952758789 0.022354125976562 0.016963958740234
Output for 5.6.14
0.028987884521484 0.021858215332031 0.019369125366211 0.022838830947876 0.017214059829712
Output for 5.6.13
0.030483961105347 0.022982120513916 0.020060062408447 0.021478176116943 0.017149925231934
Output for 5.6.12
0.029630899429321 0.022579908370972 0.019850015640259 0.024874925613403 0.017199039459229
Output for 5.6.11
0.028308868408203 0.018117904663086 0.016994953155518 0.02136492729187 0.016983985900879
Output for 5.6.10
0.023309946060181 0.01817798614502 0.016983985900879 0.021286964416504 0.016951084136963
Output for 5.6.9
0.030524015426636 0.022741079330444 0.019959926605225 0.023253917694092 0.017339944839478
Output for 5.6.8
0.029611825942993 0.022203207015991 0.019515991210938 0.022924900054932 0.017132043838501
Output for 5.6.7
0.02148699760437 0.017803907394409 0.01692795753479 0.021595001220703 0.016932010650635
Output for 5.5.35
0.019582986831665 0.017060995101929 0.015621900558472 0.019099950790405 0.014210939407349
Output for 5.5.34
0.029212951660156 0.02203893661499 0.019430875778198 0.023066997528076 0.016983985900879
Output for 5.5.33
0.025243997573853 0.018157958984375 0.017118215560913 0.025182962417603 0.017123937606812
Output for 5.5.32
0.032064914703369 0.022193908691406 0.019566059112549 0.022819042205811 0.017128944396973
Output for 5.5.31
0.020696878433228 0.017338037490845 0.017722129821777 0.020657062530518 0.016707897186279
Output for 5.5.30
0.031013965606689 0.020292043685913 0.018272161483765 0.021600961685181 0.016993045806885
Output for 5.5.29
0.02871298789978 0.021996021270752 0.019243001937866 0.022604942321777 0.017018795013428
Output for 5.5.28
0.02167010307312 0.017898082733154 0.0172119140625 0.021339178085327 0.016915798187256
Output for 5.5.27
0.030550956726074 0.022881984710693 0.020344018936157 0.027393817901611 0.017327070236206
Output for 5.5.26
0.03027606010437 0.022781848907471 0.019738912582397 0.023333072662354 0.017484903335571
Output for 5.5.25
0.030746936798096 0.020447969436646 0.016962051391602 0.021271944046021 0.016957998275757
Output for 5.5.24
0.030484914779663 0.0227210521698 0.019636869430542 0.02178692817688 0.017280101776123
Output for 5.4.45
0.044063091278076 0.024973154067993 0.022598028182983 0.028421878814697 0.022186994552612
Output for 5.4.44
0.035558938980103 0.027559041976929 0.026444911956787 0.040340185165405 0.027822017669678
Output for 5.4.43
0.029403924942017 0.025989055633545 0.023777961730957 0.02996301651001 0.025286912918091
Output for 5.4.42
0.028717994689941 0.025521993637085 0.025660037994385 0.029572010040283 0.023205041885376
Output for 5.4.41
0.029691934585571 0.025406122207642 0.025314092636108 0.046495199203491 0.031799077987671
Output for 5.4.40
0.043210029602051 0.036611080169678 0.028120040893555 0.03996205329895 0.051208019256592
Output for 5.4.39
0.062246084213257 0.046504974365234 0.053416013717651 0.030191898345947 0.025023937225342
Output for 5.4.38
0.03118109703064 0.025504112243652 0.023285150527954 0.029505968093872 0.022917985916138
Output for 5.4.37
0.035591125488281 0.02701997756958 0.026110887527466 0.029215097427368 0.0225989818573
Output for 5.4.36
0.030054092407227 0.025580167770386 0.022891044616699 0.029500007629395 0.023041009902954
Output for 5.4.35
0.034929037094116 0.02553391456604 0.023572206497192 0.030450820922852 0.028613090515137
Output for 5.4.34
0.042638063430786 0.040601015090942 0.035833120346069 0.030639886856079 0.022235870361328
Output for 5.4.32
0.027228116989136 0.018500089645386 0.016965866088867 0.022013902664185 0.017563819885254
Output for 5.4.31
0.02197790145874 0.019020795822144 0.017114877700806 0.022541999816895 0.018057107925415
Output for 5.4.30
0.022511005401611 0.019608974456787 0.020986795425415 0.031962871551514 0.020973920822144
Output for 5.4.29
0.022639036178589 0.020718097686768 0.028173923492432 0.022322177886963 0.028278112411499
Output for 5.4.28
0.034442901611328 0.028980016708374 0.024324893951416 0.023936986923218 0.021374225616455
Output for 5.4.27
0.042228937149048 0.03479790687561 0.031497955322266 0.039012908935547 0.029784917831421
Output for 5.4.26
0.059650897979736 0.033833026885986 0.027738809585571 0.048386096954346 0.028612852096558
Output for 5.4.25
0.035821199417114 0.031418085098267 0.02734899520874 0.035039901733398 0.028137922286987
Output for 5.4.24
0.05091404914856 0.040724992752075 0.027719020843506 0.03693699836731 0.028534889221191
Output for 5.4.23
0.038404941558838 0.033345937728882 0.02899694442749 0.038002967834473 0.027751922607422
Output for 5.4.22
0.034640073776245 0.030267000198364 0.026334047317505 0.034441947937012 0.029742002487183
Output for 5.4.21
0.039103031158447 0.063407182693481 0.034738063812256 0.039950132369995 0.029445886611938
Output for 5.4.20
0.035298109054565 0.031859874725342 0.028056859970093 0.036261796951294 0.028314113616943
Output for 5.4.19
0.037070035934448 0.031929969787598 0.028297901153564 0.035506963729858 0.027935028076172
Output for 5.4.18
0.036985874176025 0.026010990142822 0.020676851272583 0.032954931259155 0.025928974151611
Output for 5.4.17
0.024071931838989 0.019202947616577 0.017515182495117 0.024728059768677 0.02553391456604
Output for 5.4.16
0.035192966461182 0.031625032424927 0.027803897857666 0.036479949951172 0.028623104095459
Output for 5.4.15
0.042983055114746 0.050941944122314 0.032753944396973 0.039428949356079 0.032815933227539
Output for 5.4.14
0.027307033538818 0.02640700340271 0.024726152420044 0.031929016113281 0.026100158691406
Output for 5.4.13
0.027139186859131 0.026213884353638 0.022182941436768 0.02674412727356 0.025941133499146
Output for 5.4.12
0.031802892684937 0.029839992523193 0.026086807250977 0.033777952194214 0.025746822357178
Output for 5.4.11
0.035248994827271 0.031170845031738 0.027359962463379 0.033559083938599 0.023065805435181
Output for 5.4.10
0.033621788024902 0.025232791900635 0.025591135025024 0.031789064407349 0.019176959991455
Output for 5.4.9
0.03043007850647 0.019572973251343 0.01860499382019 0.023655891418457 0.018454074859619
Output for 5.4.8
0.029048919677734 0.02403998374939 0.019865036010742 0.025686979293823 0.020051002502441
Output for 5.4.7
0.025619983673096 0.026388883590698 0.019130945205688 0.030977010726929 0.020396947860718
Output for 5.4.6
0.041491985321045 0.036740064620972 0.032421112060547 0.040077924728394 0.031352996826172
Output for 5.4.5
0.037835836410522 0.044317960739136 0.060027837753296 0.038054943084717 0.029612064361572
Output for 5.4.4
0.033700942993164 0.028234958648682 0.025241136550903 0.035789966583252 0.039715051651001
Output for 5.4.3
0.034212827682495 0.029721975326538 0.026309013366699 0.034112930297852 0.026988983154297
Output for 5.4.2
0.039511203765869 0.03145694732666 0.027261972427368 0.035484075546265 0.027906179428101
Output for 5.4.1
0.036139965057373 0.030940055847168 0.027588844299316 0.036809206008911 0.028274059295654
Output for 5.4.0
0.042697191238403 0.037155151367188 0.032142162322998 0.041576862335205 0.032000064849854
Output for 5.3.29
0.029918909072876 0.025757789611816 0.026080131530762 0.037994146347046 0.022907018661499
Output for 5.3.28
0.050491094589233 0.045853137969971 0.05339503288269 0.048468112945557 0.038985013961792
Output for 5.3.27
0.046759128570557 0.042901992797852 0.037574052810669 0.064301013946533 0.027756929397583
Output for 5.3.26
0.055668115615845 0.027841091156006 0.026454925537109 0.033813953399658 0.026486158370972
Output for 5.3.25
0.045874118804932 0.039077997207642 0.034535884857178 0.043954849243164 0.034749031066895
Output for 5.3.24
0.031272172927856 0.02532696723938 0.022773027420044 0.029653072357178 0.030573129653931
Output for 5.3.23
0.032724857330322 0.026086807250977 0.023329019546509 0.03043794631958 0.022958040237427
Output for 5.3.22
0.029637813568115 0.025800943374634 0.032226085662842 0.031111001968384 0.023887872695923
Output for 5.3.21
0.047382116317749 0.041311979293823 0.036585092544556 0.045692205429077 0.039412975311279
Output for 5.3.20
0.046604156494141 0.0419020652771 0.03718900680542 0.045445919036865 0.025640964508057
Output for 5.3.19
0.033185958862305 0.030304193496704 0.02810001373291 0.032008171081543 0.024776935577393
Output for 5.3.18
0.035364866256714 0.029027938842773 0.025036811828613 0.030725955963135 0.024332046508789
Output for 5.3.17
0.033450126647949 0.029780864715576 0.026437997817993 0.032092094421387 0.026410102844238
Output for 5.3.16
0.033458948135376 0.029997825622559 0.026433944702148 0.034272909164429 0.026986122131348
Output for 5.3.15
0.03193998336792 0.028535127639771 0.025806903839111 0.035744905471802 0.034428834915161
Output for 5.3.14
0.043591022491455 0.034619808197021 0.048580169677734 0.032748937606812 0.024180889129639
Output for 5.3.13
0.031718015670776 0.034412860870361 0.034235000610352 0.05265998840332 0.039947986602783
Output for 5.3.12
0.046406984329224 0.047605991363525 0.041686058044434 0.043097019195557 0.034515142440796
Output for 5.3.11
0.048328876495361 0.043182849884033 0.036693096160889 0.045875787734985 0.098145961761475
Output for 5.3.10
0.042280912399292 0.039180994033813 0.034420013427734 0.042434930801392 0.03412914276123
Output for 5.3.9
0.042453050613403 0.034279108047485 0.057075977325439 0.051984071731567 0.052467107772827
Output for 5.3.8
0.10508298873901 0.045696973800659 0.050817012786865 0.093237161636353 0.053895950317383
Output for 5.3.7
0.050081014633179 0.045747995376587 0.03981614112854 0.050509929656982 0.040943145751953
Output for 5.3.6
0.050909996032715 0.046849012374878 0.041542053222656 0.058879137039185 0.043292999267578
Output for 5.3.5
0.067584991455078 0.064883947372437 0.041642904281616 0.072813987731934 0.042053937911987
Output for 5.3.4
0.053266048431396 0.047062873840332 0.040488958358765 0.051379919052124 0.04327917098999
Output for 5.3.3
0.051048994064331 0.045675992965698 0.0400550365448 0.051224946975708 0.051760911941528
Output for 5.3.2
0.041115999221802 0.06038498878479 0.034585952758789 0.04191517829895 0.036028861999512
Output for 5.3.1
0.043876886367798 0.040437936782837 0.03532886505127 0.042469024658203 0.035150051116943
Output for 5.3.0
0.043488025665283 0.039252996444702 0.036211967468262 0.044075965881348 0.035210132598877
Output for 5.2.17
0.082327127456665 0.082798957824707 0.05827784538269 0.067306041717529 0.10423588752747
Output for 5.2.16
0.076375007629395 0.066508054733276 0.053884029388428 0.065866947174072 0.060727834701538
Output for 5.2.15
0.10608816146851 0.097962141036987 0.079968929290771 0.072571992874146 0.063767910003662
Output for 5.2.14
0.082987070083618 0.098114013671875 0.081799983978271 0.070508003234863 0.060446977615356
Output for 5.2.13
0.062170028686523 0.0592200756073 0.056113004684448 0.10152888298035 0.075584888458252
Output for 5.2.12
0.088466882705688 0.070074081420898 0.053484201431274 0.069819927215576 0.058936834335327
Output for 5.2.11
0.072573900222778 0.076977014541626 0.069959163665771 0.073947906494141 0.058233022689819
Output for 5.2.10
0.083501100540161 0.061585903167725 0.057645797729492 0.066423892974854 0.054566860198975
Output for 5.2.9
0.077145099639893 0.065953969955444 0.057571172714233 0.069689035415649 0.059284925460815
Output for 5.2.8
0.081115007400513 0.17728114128113 0.069776058197021 0.059850931167603 0.055174112319946
Output for 5.2.7
0.13241100311279 0.06220006942749 0.057556867599487 0.08990216255188 0.073879957199097
Output for 5.2.6
0.1517961025238 0.1444079875946 0.060056924819946 0.054800987243652 0.052686214447021
Output for 5.2.5
0.065145969390869 0.073759078979492 0.063080072402954 0.075445175170898 0.071779012680054
Output for 5.2.4
0.074032068252563 0.068741083145142 0.059504985809326 0.078305959701538 0.055547952651978
Output for 5.2.3
0.07381010055542 0.062055110931396 0.05462908744812 0.059262037277222 0.054986000061035
Output for 5.2.2
0.073961973190308 0.060650110244751 0.074772834777832 0.076272010803223 0.071998119354248
Output for 5.2.1
0.090614795684814 0.052049875259399 0.047540187835693 0.060150146484375 0.052006959915161
Output for 5.2.0
0.068233013153076 0.058161020278931 0.062313079833984 0.063318014144897 0.061365127563477
Output for 5.1.6
0.089488983154297 0.05995512008667 0.06203293800354 0.07178807258606 0.047900915145874
Output for 5.1.5
0.061876058578491 0.074007034301758 0.05738091468811 0.067042827606201 0.063732862472534
Output for 5.1.4
0.12878012657166 0.058957099914551 0.055840015411377 0.066123008728027 0.052958011627197
Output for 5.1.3
0.087747812271118 0.045584917068481 0.051082134246826 0.053503036499023 0.041749954223633
Output for 5.1.2
0.070272922515869 0.056938886642456 0.036288022994995 0.053350925445557 0.042683839797974
Output for 5.1.1
0.089748859405518 0.066371917724609 0.050650119781494 0.11528706550598 0.066565036773682
Output for 5.1.0
0.093228101730347 0.076343059539795 0.062466859817505 0.069710969924927 0.057996034622192
Output for 5.0.5
0.20566391944885 0.20622706413269 0.13379979133606 0.18444800376892 0.13069295883179
Output for 5.0.4
0.22308397293091 0.21705389022827 0.15165901184082 0.19954586029053 0.12500500679016
Output for 5.0.3
0.19489407539368 0.18512392044067 0.19385409355164 0.2586190700531 0.12474393844604
Output for 5.0.2
0.22537803649902 0.2277660369873 0.12278199195862 0.17141485214233 0.12307691574097
Output for 5.0.1
0.17239999771118 0.19180798530579 0.15860199928284 0.20869493484497 0.12250685691833
Output for 5.0.0
0.20199489593506 0.17968583106995 0.13911008834839 0.17523694038391 0.11938810348511
Output for 4.4.9
-0.677242 0.32216 0.237632 0.198827 -0.863841
Output for 4.4.8
0.207986 0.211634 0.240195 0.169649 -0.889815
Output for 4.4.7
0.213885 0.225041 0.1105 0.254673 -0.872073
Output for 4.4.6
0.248232 0.175928 0.111231 0.251495 -0.864163
Output for 4.4.5
0.284166 0.243644 0.141285 -0.714971 0.202418
Output for 4.4.4
0.187657 0.153969 0.090656 0.109932 0.07157
Output for 4.4.3
-0.80862 0.15366 0.112387 0.204222 0.134742
Output for 4.4.2
-0.83611 0.115005 0.107242 0.099875 0.0945
Output for 4.4.1
0.130781 0.126856 0.071332 0.096973 0.0843
Output for 4.4.0
0.095116 0.102689 0.074215 0.096168 0.071335
Output for 4.3.11
0.096585 0.098691 0.074856 0.100131 0.096092
Output for 4.3.10
-0.847843 0.172 0.107317 0.134333 0.067756
Output for 4.3.9
0.121713 0.086851 0.067254 0.087523 -0.931965
Output for 4.3.8
0.105403 0.098909 0.078412 0.103941 0.067627
Output for 4.3.7
0.117058 0.156431 0.129753 -0.832917 0.123301
Output for 4.3.6
0.172209 0.164314 0.118918 0.092462 0.069944
Output for 4.3.5
-0.904668 0.103075 0.110871 0.129763 0.09271
Output for 4.3.4
0.110925 0.097585 0.07016 0.101882 0.067108
Output for 4.3.3
-0.896117 0.184942 0.08201 0.093731 0.165045
Output for 4.3.2
0.221813 -0.838152 0.119071 0.165416 0.139787
Output for 4.3.1
0.160104 0.159568 0.110232 -0.845487 0.105847
Output for 4.3.0
0.110817 0.075496 0.055296 0.070485 0.053341