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.013756036758423 0.013020992279053 0.0086331367492676
Output for 7.0.14
0.013402223587036 0.012722969055176 0.0083038806915283
Output for 7.0.11
0.011494874954224 0.011131048202515 0.0074350833892822
Output for 7.0.10
0.011953115463257 0.011366844177246 0.0076448917388916
Output for 7.0.9
0.0098259449005127 0.0095341205596924 0.0068590641021729
Output for 7.0.8
0.011056184768677 0.0090270042419434 0.0061180591583252
Output for 7.0.7
0.0087931156158447 0.0086278915405273 0.0057570934295654
Output for 7.0.6
0.013582944869995 0.011582851409912 0.0073728561401367
Output for 7.0.5
0.011171102523804 0.010668992996216 0.0077059268951416
Output for 7.0.4
0.011059045791626 0.010757923126221 0.0080339908599854
Output for 7.0.3
0.012075901031494 0.011337041854858 0.0077488422393799
Output for 7.0.2
0.011305093765259 0.010749101638794 0.0071878433227539
Output for 7.0.1
0.018443822860718 0.01676607131958 0.010227203369141
Output for 7.0.0
0.0097720623016357 0.009321928024292 0.0066909790039062
Output for 5.6.28
0.053356885910034 -0.019445180892944 -0.020512819290161
Output for 5.6.26
0.030050992965698 0.020636081695557 0.017492055892944
Output for 5.6.25
0.030741930007935 0.022993087768555 0.020516157150269
Output for 5.6.24
0.027368068695068 0.017202138900757 0.016691923141479
Output for 5.6.23
0.026119947433472 0.020279884338379 0.016804933547974
Output for 5.6.22
0.020839929580688 0.016871929168701 0.015239000320435
Output for 5.6.21
0.034321069717407 0.021198034286499 0.018846035003662
Output for 5.6.20
0.03078293800354 0.023490190505981 0.020697116851807
Output for 5.6.19
0.023999929428101 0.01816987991333 0.016913890838623
Output for 5.6.18
0.025326013565063 0.019280195236206 0.017313957214355
Output for 5.6.17
0.026525020599365 0.020535945892334 0.018535852432251
Output for 5.6.16
0.024866819381714 0.022388935089111 0.019897222518921
Output for 5.6.15
0.038974046707153 0.024949073791504 0.022035837173462
Output for 5.6.14
0.033698081970215 0.020895957946777 0.020123958587646
Output for 5.6.13
0.033285140991211 0.02428412437439 0.021481037139893
Output for 5.6.12
0.027744054794312 0.018959999084473 0.017684936523438
Output for 5.6.11
0.025914907455444 0.02341103553772 0.020246982574463
Output for 5.6.10
0.027173042297363 0.022392988204956 0.020500898361206
Output for 5.6.9
0.02803897857666 0.021837949752808 0.019562959671021
Output for 5.6.8
0.02367901802063 0.018768072128296 0.017085790634155
Output for 5.6.7
0.032234191894531 0.024186849594116 0.018450021743774
Output for 5.6.6
0.023390054702759 0.020400047302246 0.017586946487427
Output for 5.6.5
0.028409004211426 0.022894859313965 0.018661022186279
Output for 5.6.4
0.025406122207642 0.021375894546509 0.01924991607666
Output for 5.6.3
0.026695966720581 0.022930860519409 0.020023107528687
Output for 5.6.2
0.020896196365356 0.017103910446167 0.016011953353882
Output for 5.6.1
0.021368980407715 0.017886161804199 0.016997098922729
Output for 5.6.0
0.021369934082031 0.017856121063232 0.016946077346802
Output for 5.5.38
0.029548168182373 0.021557092666626 0.019027948379517
Output for 5.5.37
0.020298004150391 0.016381978988647 0.015227079391479
Output for 5.5.36
0.02577805519104 0.019498825073242 0.017487049102783
Output for 5.5.35
0.02852201461792 0.021066188812256 0.017036914825439
Output for 5.5.34
0.032150983810425 0.024344921112061 0.021351099014282
Output for 5.5.33
0.027671813964844 0.021332025527954 0.017412900924683
Output for 5.5.32
0.024554967880249 0.019798040390015 0.017578125
Output for 5.5.31
0.027304172515869 0.020836114883423 0.018037080764771
Output for 5.5.30
0.03136682510376 0.023998022079468 0.021103858947754
Output for 5.5.29
0.028095006942749 0.018232107162476 0.016963005065918
Output for 5.5.28
0.024006843566895 0.01854681968689 0.01859712600708
Output for 5.5.27
0.024074077606201 0.019195079803467 0.017321109771729
Output for 5.5.26
0.03342080116272 0.025254964828491 0.022185087203979
Output for 5.5.25
0.026042938232422 0.018898963928223 0.017569065093994
Output for 5.5.24
0.029621124267578 0.022655963897705 0.020522117614746
Output for 5.5.23
0.021703004837036 0.018121957778931 0.017577171325684
Output for 5.5.22
0.032490015029907 0.024708032608032 0.022449970245361
Output for 5.5.21
0.033727884292603 0.022190093994141 0.017980813980103
Output for 5.5.20
0.031378030776978 0.020998001098633 0.01907205581665
Output for 5.5.19
0.024503946304321 0.01884913444519 0.017407178878784
Output for 5.5.18
0.023749113082886 0.019292116165161 0.017043828964233
Output for 5.5.16
0.029401779174805 0.022432088851929 0.019972801208496
Output for 5.5.15
0.027902841567993 0.018424034118652 0.017688035964966
Output for 5.5.14
0.022413969039917 0.018350839614868 0.017024040222168
Output for 5.5.13
0.040286064147949 0.025243043899536 0.022305011749268
Output for 5.5.12
0.03461480140686 0.026220083236694 0.022899866104126
Output for 5.5.11
0.021640062332153 0.018301010131836 0.017235040664673
Output for 5.5.10
0.031537055969238 0.021816968917847 0.020045042037964
Output for 5.5.9
0.021496057510376 0.017877101898193 0.016958951950073
Output for 5.5.8
0.022912979125977 0.018624067306519 0.017128944396973
Output for 5.5.7
0.031792163848877 0.0240318775177 0.02131199836731
Output for 5.5.6
0.023568153381348 0.019144058227539 0.01862907409668
Output for 5.5.5
0.024911880493164 0.019248962402344 0.017194032669067
Output for 5.5.4
0.02539587020874 0.018038988113403 0.017270803451538
Output for 5.5.3
0.021198987960815 0.017912864685059 0.016944169998169
Output for 5.5.2
0.023004055023193 0.01823902130127 0.016927003860474
Output for 5.5.1
0.021092176437378 0.018255949020386 0.016662836074829
Output for 5.5.0
0.022540092468262 0.01887583732605 0.017832040786743
Output for 5.4.45
0.032010078430176 0.023494005203247 0.020431995391846
Output for 5.4.44
0.032871007919312 0.024563074111938 0.021214008331299
Output for 5.4.43
0.032942056655884 0.02020001411438 0.017398834228516
Output for 5.4.42
0.0293869972229 0.023094177246094 0.019819974899292
Output for 5.4.41
0.027981996536255 0.01862907409668 0.017021179199219
Output for 5.4.40
0.031068086624146 0.021960973739624 0.017577886581421
Output for 5.4.39
0.029430150985718 0.021794080734253 0.018816947937012
Output for 5.4.38
0.04320502281189 0.03543496131897 0.028600215911865
Output for 5.4.37
0.029302835464478 0.019145965576172 0.017219066619873
Output for 5.4.36
0.029376029968262 0.019497871398926 0.017672061920166
Output for 5.4.35
0.033901929855347 0.024513959884644 0.021059989929199
Output for 5.4.34
0.023022890090942 0.018245935440063 0.01639199256897
Output for 5.4.32
0.021007061004639 0.01748514175415 0.016136884689331
Output for 5.4.31
0.021231174468994 0.01772403717041 0.016245126724243
Output for 5.4.30
0.024158954620361 0.018869876861572 0.016677141189575
Output for 5.4.29
0.023690938949585 0.018595933914185 0.016286849975586
Output for 5.4.28
0.031677007675171 0.021153211593628 0.017750024795532
Output for 5.4.27
0.021106958389282 0.018993854522705 0.015899181365967
Output for 5.4.26
0.028450012207031 0.019802808761597 0.017652034759521
Output for 5.4.25
0.026412010192871 0.020503044128418 0.018022060394287
Output for 5.4.24
0.021147012710571 0.017530918121338 0.01613187789917
Output for 5.4.23
0.020915031433105 0.017579078674316 0.016241073608398
Output for 5.4.22
0.023607969284058 0.017961978912354 0.016112089157104
Output for 5.4.21
0.021798133850098 0.017713069915771 0.016147136688232
Output for 5.4.20
0.020978927612305 0.017411947250366 0.016178131103516
Output for 5.4.19
0.020946025848389 0.017366170883179 0.016152858734131
Output for 5.4.18
0.023948907852173 0.015647172927856 0.016164064407349
Output for 5.4.17
0.031575918197632 0.023542881011963 0.020307064056396
Output for 5.4.16
0.021578073501587 0.018383979797363 0.015650987625122
Output for 5.4.15
0.033926963806152 0.025264978408813 0.0238938331604
Output for 5.4.14
0.028786182403564 0.022357940673828 0.018654108047485
Output for 5.4.13
0.035639047622681 0.02237606048584 0.019596099853516
Output for 5.4.12
0.031552076339722 0.023875951766968 0.017313003540039
Output for 5.4.11
0.027557849884033 0.021928071975708 0.016157150268555
Output for 5.4.10
0.029926061630249 0.022862911224365 0.01984977722168
Output for 5.4.9
0.025464057922363 0.019508838653564 0.016268968582153
Output for 5.4.8
0.031822919845581 0.022143125534058 0.019318103790283
Output for 5.4.7
0.029955863952637 0.023683071136475 0.017114162445068
Output for 5.4.6
0.028993844985962 0.020188808441162 0.017265796661377
Output for 5.4.5
0.029353141784668 0.022511005401611 0.019549131393433
Output for 5.4.4
0.031903982162476 0.020757913589478 0.019025087356567
Output for 5.4.3
0.026649951934814 0.020648002624512 0.017752885818481
Output for 5.4.2
0.028879165649414 0.021671056747437 0.022590160369873
Output for 5.4.1
0.031774997711182 0.021262884140015 0.018709897994995
Output for 5.4.0
0.027114868164062 0.02049708366394 0.016820192337036
Output for 5.3.29
0.026421070098877 0.024628877639771 0.020787954330444
Output for 5.3.28
0.025924921035767 0.023116827011108 0.020559787750244
Output for 5.3.27
0.035616159439087 0.024038076400757 0.020798206329346
Output for 5.3.26
0.031236886978149 0.025365114212036 0.021467208862305
Output for 5.3.25
0.034091949462891 0.0294349193573 0.024272918701172
Output for 5.3.24
0.036210060119629 0.029545068740845 0.024473905563354
Output for 5.3.23
0.026487827301025 0.025657892227173 0.021574974060059
Output for 5.3.22
0.035917043685913 0.028658151626587 0.023167848587036
Output for 5.3.21
0.034170150756836 0.02763295173645 0.020740985870361
Output for 5.3.20
0.038973808288574 0.031049966812134 0.021851062774658
Output for 5.3.19
0.044188022613525 0.034824132919312 0.027600049972534
Output for 5.3.18
0.035014867782593 0.027976989746094 0.022219896316528
Output for 5.3.17
0.034976005554199 0.027831077575684 0.02220892906189
Output for 5.3.16
0.041934013366699 0.032604932785034 0.025332927703857
Output for 5.3.15
0.041597127914429 0.02731990814209 0.021270990371704
Output for 5.3.14
0.038589000701904 0.030617952346802 0.022978067398071
Output for 5.3.13
0.040739059448242 0.031229972839355 0.024499893188477
Output for 5.3.12
0.039620876312256 0.030786991119385 0.021960973739624
Output for 5.3.11
0.036920070648193 0.027405977249146 0.021898031234741
Output for 5.3.10
0.037445068359375 0.029899120330811 0.020678997039795
Output for 5.3.9
0.045598983764648 0.034066915512085 0.024250030517578
Output for 5.3.8
0.044064044952393 0.030635833740234 0.022141933441162
Output for 5.3.7
0.044044017791748 0.034419059753418 0.026649951934814
Output for 5.3.6
0.029815912246704 0.024907827377319 0.020873069763184
Output for 5.3.5
0.041316986083984 0.032673835754395 0.022345066070557
Output for 5.3.4
0.045921087265015 0.030760049819946 0.022853136062622
Output for 5.3.3
0.046387195587158 0.037642955780029 0.026887178421021
Output for 5.3.2
0.039974927902222 0.028027057647705 0.022048950195312
Output for 5.3.1
0.040329933166504 0.030547142028809 0.023422956466675
Output for 5.3.0
0.042849063873291 0.030122995376587 0.022265911102295
Output for 5.2.17
0.054671049118042 0.03708815574646 0.027953147888184
Output for 5.2.16
0.054651975631714 0.036650896072388 0.028258085250854
Output for 5.2.15
0.041846990585327 0.034002065658569 0.027565002441406
Output for 5.2.14
0.050323963165283 0.034747838973999 0.027525901794434
Output for 5.2.13
0.046072959899902 0.040853977203369 0.032985925674438
Output for 5.2.12
0.051498889923096 0.036319017410278 0.02835488319397
Output for 5.2.11
0.04771900177002 0.044731855392456 0.036218881607056
Output for 5.2.10
0.039803981781006 0.033908843994141 0.02741003036499
Output for 5.2.9
0.040554046630859 0.033718109130859 0.02745795249939
Output for 5.2.8
0.054533958435059 0.041002988815308 0.031068086624146
Output for 5.2.7
0.048207998275757 0.034864902496338 0.027572870254517
Output for 5.2.6
0.055961132049561 0.03589916229248 0.027789115905762
Output for 5.2.5
0.050915956497192 0.033174991607666 0.027590990066528
Output for 5.2.4
0.048684120178223 0.034678936004639 0.030090808868408
Output for 5.2.3
0.06025218963623 0.040687084197998 0.03017520904541
Output for 5.2.2
0.047018051147461 0.036674976348877 0.028232097625732
Output for 5.2.1
0.051006078720093 0.035473823547363 0.027290821075439
Output for 5.2.0
0.04603099822998 0.040683031082153 0.035691976547241
Output for 5.1.6
0.053966999053955 0.038893222808838 0.027439117431641
Output for 5.1.5
0.062007188796997 0.041906118392944 0.031583070755005
Output for 5.1.4
0.047049999237061 0.044461011886597 0.037203073501587
Output for 5.1.3
0.050916910171509 0.038644075393677 0.028128147125244
Output for 5.1.2
0.04558801651001 0.043109893798828 0.037791967391968
Output for 5.1.1
0.046708822250366 0.037457942962646 0.027674913406372
Output for 5.1.0
0.055835008621216 0.036134004592896 0.029728174209595
Output for 5.0.5
0.1032600402832 0.078742027282715 0.062199115753174
Output for 5.0.4
0.11335778236389 0.079172134399414 0.05859112739563
Output for 5.0.3
0.098695993423462 0.075294017791748 0.052035093307495
Output for 5.0.2
0.11579394340515 0.081671953201294 0.052426815032959
Output for 5.0.1
0.12069606781006 0.084489107131958 0.051067113876343
Output for 5.0.0
0.089554071426392 0.074696063995361 0.053706884384155
Output for 4.4.9
0.098555 0.073216 0.054819
Output for 4.4.8
0.107865 0.076307 0.054625
Output for 4.4.7
0.108222 0.077231 0.053938
Output for 4.4.6
0.113164 0.074511 0.053186
Output for 4.4.5
0.113352 0.07301 0.053424
Output for 4.4.4
0.112087 0.077831 0.055442
Output for 4.4.3
0.107515 0.074882 0.055269
Output for 4.4.2
0.108504 0.081104 0.054876
Output for 4.4.1
0.111854 0.081027 0.054452
Output for 4.4.0
0.10879 0.075534 0.056037
Output for 4.3.11
0.10688 0.07265 0.05363
Output for 4.3.10
0.103596 0.075501 0.05577
Output for 4.3.9
0.107923 0.07507 0.056245
Output for 4.3.8
0.104613 0.075922 0.055143
Output for 4.3.7
0.094337 0.073705 0.053601
Output for 4.3.6
0.121401 0.086589 0.055596
Output for 4.3.5
0.118758 0.083292 0.05363
Output for 4.3.4
0.10091 0.100943 0.073586
Output for 4.3.3
0.117866 0.071197 0.050827
Output for 4.3.2
0.10514 0.074872 0.053288
Output for 4.3.1
0.097836 0.07225 0.054565
Output for 4.3.0
0.112824 0.081202 0.053818