3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test1() { $s = microtime(true); $var = null; for ($i = 0; $i < 1000000; $i++) { $condition = $var === null; } return microtime(true) - $s; } function test2() { $s = microtime(true); $var = null; for ($i = 0; $i < 1000000; $i++) { $condition = !isset($var); } return microtime(true) - $s; } function test3() { $s = microtime(true); $var = null; for ($i = 0; $i < 1000000; $i++) { $condition = empty($var); } return microtime(true) - $s; } echo test1() . "\n\n"; echo test2() . "\n\n";
Output for 7.1.0
0.024755001068115 0.025856018066406
Output for 7.0.14
0.012438058853149 -0.024264097213745
Output for 7.0.12
0.019548892974854 0.018971920013428
Output for 7.0.11
0.015386819839478 0.016772985458374
Output for 7.0.10
0.012140035629272 0.013674974441528
Output for 7.0.9
0.018954992294312 0.021072149276733
Output for 7.0.8
0.014055967330933 0.015963077545166
Output for 7.0.7
0.013998985290527 0.017760038375854
Output for 7.0.6
0.023308992385864 0.024605989456177
Output for 7.0.5
0.029770851135254 0.029551029205322
Output for 7.0.4
0.018653869628906 0.019366025924683
Output for 7.0.3
0.016247034072876 0.017466068267822
Output for 7.0.2
0.013941049575806 0.017606019973755
Output for 7.0.1
0.029680013656616 0.029294967651367
Output for 7.0.0
0.014358997344971 0.015806198120117
Output for 5.6.28
0.039177179336548 -0.079598903656006
Output for 5.6.27
0.069806098937988 0.062654972076416
Output for 5.6.26
0.074435949325562 0.060915946960449
Output for 5.6.25
0.063760042190552 0.049171924591064
Output for 5.6.24
0.042128086090088 0.04749608039856
Output for 5.6.23
0.04041314125061 0.040112972259521
Output for 5.6.22
0.030639886856079 0.034232139587402
Output for 5.6.21
0.032065868377686 0.03450608253479
Output for 5.6.20
0.070565938949585 0.059023141860962
Output for 5.6.19
0.034676074981689 0.03730297088623
Output for 5.6.18
0.030406951904297 -0.12858390808105
Output for 5.6.17
0.058568000793457 -0.13134598731995
Output for 5.6.16
0.037606000900269 0.034401893615723
Output for 5.6.15
0.037208080291748 0.041150093078613
Output for 5.6.14
0.052219867706299 -0.12856197357178
Output for 5.6.13
0.030642986297607 0.041472911834717
Output for 5.6.12
0.059981107711792 0.048485994338989
Output for 5.6.11
0.036041975021362 0.034495115280151
Output for 5.6.10
0.040698051452637 0.035285949707031
Output for 5.6.9
0.035812139511108 0.034291982650757
Output for 5.6.8
0.033056974411011 0.03942608833313
Output for 5.6.7
0.034818887710571 0.038851976394653
Output for 5.6.6
0.034456014633179 0.040019035339355
Output for 5.6.5
-0.44987392425537 0.053743124008179
Output for 5.6.4
0.044667959213257 0.038527011871338
Output for 5.6.3
0.044148206710815 0.045303106307983
Output for 5.6.2
-0.011437892913818 0.034080982208252
Output for 5.6.1
0.048550128936768 0.046159982681274
Output for 5.6.0
0.033186197280884 0.034075975418091
Output for 5.5.38
0.036648988723755 0.038810968399048
Output for 5.5.37
0.034106969833374 0.031152009963989
Output for 5.5.36
0.046753168106079 0.046235084533691
Output for 5.5.35
0.037206888198853 0.034320116043091
Output for 5.5.34
0.043362855911255 0.04334282875061
Output for 5.5.33
0.035971879959106 0.036872863769531
Output for 5.5.32
0.043324947357178 0.036842823028564
Output for 5.5.31
0.0381920337677 0.038753986358643
Output for 5.5.30
0.033507108688354 0.03801703453064
Output for 5.5.29
0.040402889251709 0.040356159210205
Output for 5.5.28
0.040565013885498 0.03907299041748
Output for 5.5.27
0.026279926300049 0.038496017456055
Output for 5.5.26
0.034080028533936 0.036708116531372
Output for 5.5.25
0.040823936462402 0.04155421257019
Output for 5.5.24
0.03932785987854 0.040048122406006
Output for 5.5.23
0.033147096633911 0.034801006317139
Output for 5.5.22
0.032824039459229 0.035581827163696
Output for 5.5.21
0.038731813430786 0.035274028778076
Output for 5.5.20
0.041755199432373 0.04253888130188
Output for 5.5.19
0.035514831542969 0.034713983535767
Output for 5.5.18
0.035320043563843 0.039413928985596
Output for 5.5.16
0.035813093185425 0.036811113357544
Output for 5.5.15
0.046057939529419 0.037584781646729
Output for 5.5.14
0.043314933776855 0.038167953491211
Output for 5.5.13
0.04472017288208 0.042059898376465
Output for 5.5.12
0.030805826187134 0.042433977127075
Output for 5.5.11
0.03842306137085 0.039960861206055
Output for 5.5.10
-0.036710023880005 0.040080070495605
Output for 5.5.9
0.041124105453491 0.043407917022705
Output for 5.5.8
0.030608177185059 0.035969972610474
Output for 5.5.7
0.034924983978271 0.037697076797485
Output for 5.5.6
0.030211925506592 -0.072106122970581
Output for 5.5.5
0.025421857833862 0.029379844665527
Output for 5.5.4
0.034121036529541 0.043416976928711
Output for 5.5.3
0.042505979537964 0.036275863647461
Output for 5.5.2
0.047060966491699 0.046580076217651
Output for 5.5.1
0.032129049301147 -0.083551168441772
Output for 5.5.0
0.026767015457153 0.030808925628662
Output for 5.4.45
0.045889854431152 0.0416579246521
Output for 5.4.44
0.036694049835205 0.039109945297241
Output for 5.4.43
0.033969163894653 0.037752866744995
Output for 5.4.42
0.029906034469604 0.034680843353271
Output for 5.4.41
0.034287929534912 0.035347938537598
Output for 5.4.40
0.029838085174561 0.034500122070312
Output for 5.4.39
0.026984930038452 -0.043098926544189
Output for 5.4.38
0.027721881866455 0.030893087387085
Output for 5.4.37
0.034515857696533 0.036460876464844
Output for 5.4.36
0.031460046768188 0.034334897994995
Output for 5.4.35
0.050909996032715 0.040656089782715
Output for 5.4.34
0.03287410736084 0.035749912261963
Output for 5.4.32
0.042086124420166 0.045303106307983
Output for 5.4.31
0.030457973480225 0.034932851791382
Output for 5.4.30
0.044256210327148 0.045184135437012
Output for 5.4.29
0.034431934356689 0.038226127624512
Output for 5.4.28
0.033950090408325 0.035192012786865
Output for 5.4.27
0.039910078048706 0.042802095413208
Output for 5.4.26
0.049492120742798 0.039419174194336
Output for 5.4.25
0.029730081558228 0.034333944320679
Output for 5.4.24
0.038717985153198 0.037804126739502
Output for 5.4.23
0.031254053115845 0.034602880477905
Output for 5.4.22
0.043915033340454 0.043882131576538
Output for 5.4.21
0.043943166732788 0.037675857543945
Output for 5.4.20
0.035102128982544 0.037349939346313
Output for 5.4.19
0.029929876327515 0.034470081329346
Output for 5.4.18
0.042804002761841 0.034003973007202
Output for 5.4.17
0.036298036575317 0.036571025848389
Output for 5.4.16
0.030419826507568 0.034534931182861
Output for 5.4.15
0.035480976104736 0.037245988845825
Output for 5.4.14
-0.014622926712036 0.032835006713867
Output for 5.4.13
0.031968116760254 0.035815000534058
Output for 5.4.12
0.036153078079224 0.036429882049561
Output for 5.4.11
0.031520843505859 0.036335945129395
Output for 5.4.10
0.033460140228271 0.036688089370728
Output for 5.4.9
0.033253908157349 -0.034932851791382
Output for 5.4.8
0.029711961746216 0.04472804069519
Output for 5.4.7
0.029993057250977 0.034596920013428
Output for 5.4.6
0.013926982879639 0.034630060195923
Output for 5.4.5
0.026364088058472 0.028457164764404
Output for 5.4.4
0.024461030960083 0.028455972671509
Output for 5.4.3
0.029892921447754 0.034366130828857
Output for 5.4.2
0.024933099746704 0.030894041061401
Output for 5.4.1
0.024542808532715 0.028949022293091
Output for 5.4.0
0.047364950180054 0.038712024688721
Output for 5.3.29
0.055213928222656 0.051164865493774
Output for 5.3.28
0.042430877685547 0.045551061630249
Output for 5.3.27
0.056121826171875 0.05280590057373
Output for 5.3.26
0.04692816734314 0.046509027481079
Output for 5.3.25
0.057847023010254 0.054496049880981
Output for 5.3.24
0.052335977554321 0.0502769947052
Output for 5.3.23
0.04642915725708 0.058295011520386
Output for 5.3.22
0.040035009384155 0.045351982116699
Output for 5.3.21
0.064879894256592 0.050962924957275
Output for 5.3.20
0.054757833480835 0.05105996131897
Output for 5.3.19
0.064685821533203 0.047422885894775
Output for 5.3.18
0.045814990997314 0.052047967910767
Output for 5.3.17
0.041559934616089 0.045443773269653
Output for 5.3.16
0.04298210144043 0.050079107284546
Output for 5.3.15
0.043854951858521 0.055077075958252
Output for 5.3.14
0.039570093154907 0.039664030075073
Output for 5.3.13
0.035593032836914 0.037467956542969
Output for 5.3.12
0.035016059875488 0.037184000015259
Output for 5.3.11
0.03447699546814 -0.083611011505127
Output for 5.3.10
0.037162065505981 0.054103851318359
Output for 5.3.9
0.035547018051147 0.038668870925903
Output for 5.3.8
0.027809143066406 0.041115045547485
Output for 5.3.7
0.043323993682861 0.042289972305298
Output for 5.3.6
0.035758972167969 0.039191007614136
Output for 5.3.5
0.043704986572266 -0.10732316970825
Output for 5.3.4
0.037106037139893 0.041884183883667
Output for 5.3.3
0.041928052902222 0.045906066894531
Output for 5.3.2
0.056442022323608 0.047359943389893
Output for 5.3.1
0.035572052001953 0.038083076477051
Output for 5.3.0
0.056230068206787 0.052396059036255
Output for 5.2.17
0.053501129150391 0.067172050476074
Output for 5.2.16
0.063676834106445 0.067163944244385
Output for 5.2.15
0.061424970626831 0.074887990951538
Output for 5.2.14
0.060104131698608 -0.15618300437927
Output for 5.2.13
0.054502964019775 0.065398931503296
Output for 5.2.12
0.0797119140625 -0.18844509124756
Output for 5.2.11
0.049433946609497 0.060683965682983
Output for 5.2.10
0.047853946685791 0.058778047561646
Output for 5.2.9
0.085343837738037 0.082098007202148
Output for 5.2.8
0.071000099182129 0.070653915405273
Output for 5.2.7
0.087934017181396 0.083546876907349
Output for 5.2.6
0.048470020294189 0.060427188873291
Output for 5.2.5
0.066570043563843 0.06761908531189
Output for 5.2.4
0.064852952957153 0.068728923797607
Output for 5.2.3
0.055219173431396 0.073877096176147
Output for 5.2.2
0.054610967636108 0.067676067352295
Output for 5.2.1
0.06020188331604 0.077461004257202
Output for 5.2.0
0.055433988571167 0.068553924560547
Output for 5.1.6
0.053946971893311 -0.12391901016235
Output for 5.1.5
0.073832988739014 0.069294929504395
Output for 5.1.4
0.071725845336914 0.074785947799683
Output for 5.1.3
0.082206010818481 0.077754974365234
Output for 5.1.2
-0.017888069152832 0.069082021713257
Output for 5.1.1
0.12373399734497 0.077745199203491
Output for 5.1.0
0.12859201431274 0.083579063415527
Output for 5.0.5
0.20918011665344 0.14736485481262
Output for 5.0.4
0.14763188362122 0.14585900306702
Output for 5.0.3
0.11082196235657 0.13825106620789
Output for 5.0.2
0.037802934646606 0.13188195228577
Output for 5.0.1
-0.033080101013184 0.13296103477478
Output for 5.0.0
0.18841600418091 0.14774298667908
Output for 4.4.9
0.199388 0.146842
Output for 4.4.8
0.203252 -0.38272
Output for 4.4.7
0.14832 0.135062
Output for 4.4.6
0.142139 0.132761
Output for 4.4.5
0.105336 0.137359
Output for 4.4.4
0.132822 0.120618
Output for 4.4.3
-0.124222 0.149952
Output for 4.4.2
0.179349 0.151392
Output for 4.4.1
0.177236 0.163259
Output for 4.4.0
0.195163 0.154184
Output for 4.3.11
0.189931 0.172199
Output for 4.3.10
0.201278 0.149781
Output for 4.3.9
0.170874 0.145345
Output for 4.3.8
0.001929 0.15202
Output for 4.3.7
0.200053 0.146414
Output for 4.3.6
-0.024591 0.160692
Output for 4.3.5
0.174401 0.179916
Output for 4.3.4
-0.161273 0.142722
Output for 4.3.3
0.199553 0.144545
Output for 4.3.2
0.188422 -0.427307
Output for 4.3.1
0.159788 0.128231
Output for 4.3.0
0.210054 0.13869