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"; echo test3() . "\n\n";
Output for 7.1.0
0.025201797485352 0.026048898696899 0.025749921798706
Output for 7.0.14
0.024464845657349 0.024353981018066 0.024728059768677
Output for 7.0.6
0.021592140197754 0.022511959075928 0.022053956985474
Output for 7.0.5
0.019855976104736 0.020441055297852 0.020512104034424
Output for 7.0.4
0.01366400718689 0.01537013053894 0.016539096832275
Output for 7.0.3
0.019850015640259 0.01848292350769 0.016645908355713
Output for 7.0.2
0.020944118499756 0.020362854003906 0.020204067230225
Output for 7.0.1
0.013186931610107 0.015805006027222 0.016252040863037
Output for 7.0.0
0.016792058944702 0.018281936645508 0.019972085952759
Output for hhvm-3.12.0
0.076412916183472 0.064346075057983 0.064453125
Output for hhvm-3.10.0
0.057785987854004 0.054080963134766 0.055969953536987
Output for 5.6.28
0.099161863327026 0.072999000549316 0.064154863357544
Output for 5.6.21
0.04513692855835 0.041198968887329 0.038012027740479
Output for 5.6.20
0.039972066879272 0.038888931274414 0.036179065704346
Output for 5.6.19
0.031584024429321 0.03429388999939 0.036602973937988
Output for 5.6.18
0.030537128448486 0.033441066741943 0.035443782806396
Output for 5.6.17
0.040542125701904 0.036350011825562 0.035928964614868
Output for 5.6.16
0.038552045822144 0.037612915039062 0.036062002182007
Output for 5.6.15
0.043750047683716 0.041030168533325 0.0382080078125
Output for 5.6.14
0.044164896011353 0.041492938995361 0.037518978118896
Output for 5.6.13
0.045976877212524 0.039298057556152 0.036558151245117
Output for 5.6.12
0.042773962020874 0.040979146957397 0.036625146865845
Output for 5.6.11
0.046782970428467 0.036278009414673 0.035944938659668
Output for 5.6.10
0.038619995117188 0.035252094268799 0.035044193267822
Output for 5.6.9
0.04074501991272 0.03714394569397 0.037476778030396
Output for 5.6.8
0.039659976959229 0.037632942199707 0.036645889282227
Output for 5.6.7
0.032860994338989 0.034206867218018 0.036530017852783
Output for 5.5.35
0.044615030288696 0.04346489906311 0.037868022918701
Output for 5.5.34
0.037989854812622 0.04180908203125 0.03584098815918
Output for 5.5.33
0.031321048736572 0.035305023193359 0.035461902618408
Output for 5.5.32
0.032083988189697 0.03708291053772 0.035392045974731
Output for 5.5.31
0.033679962158203 0.034923076629639 0.035354852676392
Output for 5.5.30
0.037585973739624 0.039427042007446 0.036606073379517
Output for 5.5.29
0.044229030609131 0.042738914489746 0.038017988204956
Output for 5.5.28
0.045853137969971 0.044272899627686 0.038104057312012
Output for 5.5.27
0.045469999313354 0.043067932128906 0.038841009140015
Output for 5.5.26
0.043915987014771 0.044545888900757 0.036964893341064
Output for 5.5.25
0.045252084732056 0.041169881820679 0.036494016647339
Output for 5.5.24
0.042637825012207 0.040060043334961 0.036720991134644
Output for 5.4.45
0.043699026107788 0.068440914154053 0.072038173675537
Output for 5.4.44
0.045898914337158 0.061499118804932 0.092599868774414
Output for 5.4.43
0.04242205619812 0.04958701133728 0.049150943756104
Output for 5.4.42
0.045439958572388 0.049854040145874 0.052100896835327
Output for 5.4.41
0.050950050354004 0.084743976593018 0.054945945739746
Output for 5.4.40
0.042263984680176 0.050121784210205 0.050185918807983
Output for 5.4.39
0.044978857040405 0.052861928939819 0.069290161132812
Output for 5.4.38
0.052294969558716 0.08262300491333 0.11263799667358
Output for 5.4.37
0.044776916503906 0.049865007400513 0.066795110702515
Output for 5.4.36
0.066934823989868 0.090764999389648 0.076905965805054
Output for 5.4.35
0.043483972549438 0.049328088760376 0.054044008255005
Output for 5.4.34
0.046149969100952 0.054529905319214 0.053767919540405
Output for 5.4.32
0.03478479385376 0.038542985916138 0.03892183303833
Output for 5.4.31
0.031560897827148 0.036154985427856 0.036301136016846
Output for 5.4.30
0.032460927963257 0.042178869247437 0.036394119262695
Output for 5.4.29
0.032449960708618 0.036038875579834 0.038297176361084
Output for 5.4.28
0.051841974258423 0.047136068344116 0.055535078048706
Output for 5.4.27
0.069054841995239 0.056071043014526 0.042916059494019
Output for 5.4.26
0.033852100372314 0.041369199752808 0.038435935974121
Output for 5.4.25
0.033899068832397 0.039367914199829 0.039583921432495
Output for 5.4.24
0.057261943817139 0.064082145690918 0.063836097717285
Output for 5.4.23
0.073084115982056 0.060256004333496 0.070981979370117
Output for 5.4.22
0.054366111755371 0.082175970077515 0.066656112670898
Output for 5.4.21
0.10793709754944 0.083029985427856 0.063315868377686
Output for 5.4.20
0.03488302230835 0.047347068786621 0.040341854095459
Output for 5.4.19
0.032655000686646 0.052451133728027 0.057540893554688
Output for 5.4.18
0.039193153381348 0.067824125289917 0.064253091812134
Output for 5.4.17
0.044640064239502 0.039872884750366 0.046357870101929
Output for 5.4.16
0.041285037994385 0.060669898986816 0.057660102844238
Output for 5.4.15
0.055918216705322 0.064932107925415 0.067273139953613
Output for 5.4.14
0.050256013870239 0.051676988601685 0.049952030181885
Output for 5.4.13
0.034410953521729 0.0447678565979 0.044196844100952
Output for 5.4.12
0.045766115188599 0.046464920043945 0.041794061660767
Output for 5.4.11
0.059717893600464 0.077431917190552 0.077049970626831
Output for 5.4.10
0.052425146102905 0.060115098953247 0.054938077926636
Output for 5.4.9
0.08060097694397 0.076040029525757 0.076860189437866
Output for 5.4.8
0.074321985244751 0.071940898895264 0.053057193756104
Output for 5.4.7
0.045380115509033 0.042855978012085 0.041756153106689
Output for 5.4.6
0.035356998443604 0.040796041488647 0.039231061935425
Output for 5.4.5
0.034219980239868 0.041404962539673 0.040043830871582
Output for 5.4.4
0.034183025360107 0.042313098907471 0.057152032852173
Output for 5.4.3
0.039079904556274 0.044395923614502 0.064438819885254
Output for 5.4.2
0.065554857254028 0.083733797073364 0.068106889724731
Output for 5.4.1
0.038811922073364 0.044836044311523 0.044862985610962
Output for 5.4.0
0.033241033554077 0.041872978210449 0.040582180023193
Output for 5.3.29
0.056670904159546 0.061360120773315 0.061554908752441
Output for 5.3.28
0.048949003219604 0.052779912948608 0.051478862762451
Output for 5.3.27
0.045870065689087 0.05141806602478 0.051757097244263
Output for 5.3.26
0.047818899154663 0.058226108551025 0.058103084564209
Output for 5.3.25
0.047760963439941 0.054195880889893 0.060475826263428
Output for 5.3.24
0.072116851806641 0.07648491859436 0.059429168701172
Output for 5.3.23
0.072108030319214 0.085187196731567 0.09305214881897
Output for 5.3.22
0.073317050933838 0.082460165023804 0.05056095123291
Output for 5.3.21
0.047854900360107 0.053462982177734 0.069787979125977
Output for 5.3.20
0.047479867935181 0.052742958068848 0.053723096847534
Output for 5.3.19
0.046241998672485 0.072099924087524 0.05104398727417
Output for 5.3.18
0.044638872146606 0.057137966156006 0.064472913742065
Output for 5.3.17
0.057047128677368 0.075407028198242 0.080015182495117
Output for 5.3.16
0.056170225143433 0.04941201210022 0.049647092819214
Output for 5.3.15
0.099370002746582 0.05557107925415 0.058082103729248
Output for 5.3.14
0.046185970306396 0.055845022201538 0.050899028778076
Output for 5.3.13
0.047431945800781 0.063297986984253 0.073508977890015
Output for 5.3.12
0.066632032394409 0.073455810546875 0.092446088790894
Output for 5.3.11
0.070022821426392 0.079351186752319 0.097897052764893
Output for 5.3.10
0.072305202484131 0.078380823135376 0.080083131790161
Output for 5.3.9
0.096475124359131 0.073550939559937 0.078394889831543
Output for 5.3.8
0.068403959274292 0.094731092453003 0.086619138717651
Output for 5.3.7
0.07289981842041 0.077578067779541 0.077998876571655
Output for 5.3.6
0.091313123703003 0.086596012115479 0.10340905189514
Output for 5.3.5
0.094043970108032 0.067997932434082 0.07022500038147
Output for 5.3.4
0.046115159988403 0.056046962738037 0.050437927246094
Output for 5.3.3
0.071771860122681 0.097390174865723 0.097461938858032
Output for 5.3.2
0.072783946990967 0.068153142929077 0.063359022140503
Output for 5.3.1
0.053243160247803 0.055567026138306 0.054488182067871
Output for 5.3.0
0.048144102096558 0.051012992858887 0.058658123016357
Output for 5.2.17
0.07732892036438 0.088980913162231 0.095906019210815
Output for 5.2.16
0.073886871337891 0.085501909255981 0.11910510063171
Output for 5.2.15
0.10589790344238 0.13736796379089 0.1289439201355
Output for 5.2.14
0.13821482658386 0.15683603286743 0.15067315101624
Output for 5.2.13
0.09680700302124 0.14124512672424 0.14101791381836
Output for 5.2.12
0.10062694549561 0.12549805641174 0.11237621307373
Output for 5.2.11
0.10018491744995 0.15844011306763 0.20610213279724
Output for 5.2.10
0.16792607307434 0.13223218917847 0.12773299217224
Output for 5.2.9
0.10568499565125 0.099174022674561 0.15111708641052
Output for 5.2.8
0.11360311508179 0.14644694328308 0.14776706695557
Output for 5.2.7
0.067758798599243 0.085731029510498 0.098695039749146
Output for 5.2.6
0.09490704536438 0.16162705421448 0.16773104667664
Output for 5.2.5
0.11398911476135 0.15180397033691 0.092087984085083
Output for 5.2.4
0.08705997467041 0.088799953460693 0.092763900756836
Output for 5.2.3
0.066858053207397 0.084200143814087 0.088716983795166
Output for 5.2.2
0.065740823745728 0.093143939971924 0.085336208343506
Output for 5.2.1
0.15918684005737 0.12913012504578 0.14061212539673
Output for 5.2.0
0.079421043395996 0.11128807067871 0.12837910652161
Output for 5.1.6
0.080517053604126 0.099677801132202 0.089946031570435
Output for 5.1.5
0.083887100219727 0.11108589172363 0.13108491897583
Output for 5.1.4
0.1150369644165 0.14425086975098 0.1255578994751
Output for 5.1.3
0.12911915779114 0.15195393562317 0.17697191238403
Output for 5.1.2
0.098639011383057 0.088710069656372 0.094206809997559
Output for 5.1.1
0.11888003349304 0.099328994750977 0.13022994995117
Output for 5.1.0
0.15974712371826 0.15790605545044 0.15749096870422
Output for 5.0.5
0.45395803451538 0.32199215888977 0.30845403671265
Output for 5.0.4
0.39276003837585 0.227952003479 0.36435508728027
Output for 5.0.3
0.438316822052 0.26331615447998 0.31781601905823
Output for 5.0.2
0.26857900619507 0.17251706123352 0.19886803627014
Output for 5.0.1
0.37271809577942 0.2271420955658 0.22556710243225
Output for 5.0.0
0.35555601119995 0.21833395957947 0.17828583717346
Output for 4.4.9
0.358841 -0.665652 0.395318
Output for 4.4.8
-0.525852 0.391824 0.438488
Output for 4.4.7
-0.49751 0.385195 -0.751045
Output for 4.4.6
0.38091 -0.503877 0.45466
Output for 4.4.5
-0.330169 0.645055 -0.560047
Output for 4.4.4
0.444379 -0.652899 0.386298
Output for 4.4.3
0.465227 -0.631651 0.405141
Output for 4.4.2
-0.520863 0.437356 -0.637896
Output for 4.4.1
0.412171 0.326024 -0.680898
Output for 4.4.0
0.410094 0.359591 -0.685342
Output for 4.3.11
0.304116 0.243018 -0.760964
Output for 4.3.10
0.41074 0.376134 -0.632632
Output for 4.3.9
0.325712 -0.679139 0.362189
Output for 4.3.8
0.307425 -0.69165 0.339454
Output for 4.3.7
0.303043 0.240301 -0.722189
Output for 4.3.6
0.321056 0.244536 -0.712878
Output for 4.3.5
0.406728 0.320953 -0.722292
Output for 4.3.4
0.334321 0.35766 -0.749869
Output for 4.3.3
0.332232 0.346121 -0.649861
Output for 4.3.2
0.447509 -0.665506 0.257381
Output for 4.3.1
0.452297 -0.666012 0.237498
Output for 4.3.0
0.199907 -0.828864 0.165048