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.023936986923218 0.025279998779297 0.021723031997681
Output for 7.0.14
0.024507999420166 0.024427175521851 0.020977973937988
Output for 7.0.6
0.01433801651001 0.015669107437134 0.014348983764648
Output for 7.0.5
0.024060010910034 0.020697116851807 0.017601013183594
Output for 7.0.4
0.013697147369385 0.015346050262451 0.013792037963867
Output for 7.0.3
0.01665186882019 0.016507148742676 0.014178037643433
Output for 7.0.2
0.017207145690918 0.016429901123047 0.016901016235352
Output for 7.0.1
0.019902944564819 0.022001028060913 0.017495155334473
Output for 7.0.0
0.019685983657837 0.020017147064209 0.016788005828857
Output for hhvm-3.12.0
0.070013046264648 0.070513010025024 0.068022012710571
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
0.09879994392395 0.080915927886963 0.060018062591553
Output for 5.6.21
0.04052996635437 0.037864208221436 0.029690027236938
Output for 5.6.20
0.046518087387085 0.042256116867065 0.032399892807007
Output for 5.6.19
0.03241491317749 0.035564184188843 0.029814958572388
Output for 5.6.18
0.042724847793579 0.038565874099731 0.029889106750488
Output for 5.6.17
0.033145189285278 0.035795211791992 0.029390811920166
Output for 5.6.16
0.032169103622437 0.035710096359253 0.030166864395142
Output for 5.6.15
0.047654151916504 0.043333053588867 0.032656908035278
Output for 5.6.14
0.032886981964111 0.035330057144165 0.029387950897217
Output for 5.6.13
0.041076898574829 0.036197900772095 0.0293288230896
Output for 5.6.12
0.044579982757568 0.042833089828491 0.031522035598755
Output for 5.6.11
0.049018859863281 0.041640043258667 0.030616044998169
Output for 5.6.10
0.041752815246582 0.040122985839844 0.030428886413574
Output for 5.6.9
0.046328067779541 0.043142080307007 0.031875133514404
Output for 5.6.8
0.045021057128906 0.044480085372925 0.032463073730469
Output for 5.6.7
0.03242301940918 0.034147977828979 0.02994704246521
Output for 5.5.35
0.041568994522095 0.04798412322998 0.041821956634521
Output for 5.5.34
0.041551828384399 0.036835908889771 0.029351234436035
Output for 5.5.33
0.031061172485352 0.035118818283081 0.029604911804199
Output for 5.5.32
0.041895866394043 0.04460597038269 0.030382871627808
Output for 5.5.31
0.040597915649414 0.040327072143555 0.030246019363403
Output for 5.5.30
0.042282819747925 0.041476964950562 0.031018972396851
Output for 5.5.29
0.041776895523071 0.036459922790527 0.029406070709229
Output for 5.5.28
0.040999174118042 0.040874004364014 0.0378577709198
Output for 5.5.27
0.042557001113892 0.041200876235962 0.031165838241577
Output for 5.5.26
0.037894010543823 0.038917064666748 0.02948784828186
Output for 5.5.25
0.034950971603394 0.036489963531494 0.030671119689941
Output for 5.5.24
0.042004108428955 0.039324998855591 0.030306100845337
Output for 5.4.45
0.042181015014648 0.067924976348877 0.04249095916748
Output for 5.4.44
0.087590932846069 0.089723110198975 0.068636178970337
Output for 5.4.43
0.061540126800537 0.065538883209229 0.046921014785767
Output for 5.4.42
0.050971031188965 0.054638147354126 0.046088933944702
Output for 5.4.41
0.060703992843628 0.06580114364624 0.04238486289978
Output for 5.4.40
0.046627998352051 0.058613061904907 0.047761917114258
Output for 5.4.39
0.042861938476562 0.050215005874634 0.060567140579224
Output for 5.4.38
0.044039011001587 0.057638883590698 0.04861307144165
Output for 5.4.37
0.042538166046143 0.047981023788452 0.048061847686768
Output for 5.4.36
0.047688007354736 0.04970121383667 0.04363489151001
Output for 5.4.35
0.041794061660767 0.053435087203979 0.046371936798096
Output for 5.4.34
0.043152809143066 0.05181097984314 0.045098066329956
Output for 5.4.32
0.031521081924438 0.040021896362305 0.031500101089478
Output for 5.4.31
0.032938957214355 0.041461944580078 0.036777019500732
Output for 5.4.30
0.032831192016602 0.03703784942627 0.032444953918457
Output for 5.4.29
0.03234601020813 0.035818099975586 0.031583786010742
Output for 5.4.28
0.051738023757935 0.05610203742981 0.063843011856079
Output for 5.4.27
0.051393985748291 0.061046123504639 0.053006887435913
Output for 5.4.26
0.05290412902832 0.061408996582031 0.052242994308472
Output for 5.4.25
0.051015853881836 0.059826135635376 0.050673007965088
Output for 5.4.24
0.058272123336792 0.056732892990112 0.070022106170654
Output for 5.4.23
0.050504922866821 0.05798602104187 0.04843807220459
Output for 5.4.22
0.053195953369141 0.070720911026001 0.053112030029297
Output for 5.4.21
0.052304029464722 0.061222076416016 0.052477121353149
Output for 5.4.20
0.094191074371338 0.11987900733948 0.10584497451782
Output for 5.4.19
0.080234050750732 0.074183940887451 0.064550161361694
Output for 5.4.18
0.051044940948486 0.065591096878052 0.04950213432312
Output for 5.4.17
0.051943063735962 0.057521104812622 0.04999303817749
Output for 5.4.16
0.049588918685913 0.065292119979858 0.053992986679077
Output for 5.4.15
0.056087017059326 0.06514310836792 0.056427001953125
Output for 5.4.14
0.057561874389648 0.05965781211853 0.052544116973877
Output for 5.4.13
0.050328016281128 0.05902099609375 0.052913904190063
Output for 5.4.12
0.051753997802734 0.058535814285278 0.051765918731689
Output for 5.4.11
0.077272891998291 0.11466503143311 0.0817551612854
Output for 5.4.10
0.057673931121826 0.072920083999634 0.059427976608276
Output for 5.4.9
0.061011075973511 0.087228059768677 0.059054136276245
Output for 5.4.8
0.063005924224854 0.063543796539307 0.055841207504272
Output for 5.4.7
0.056269884109497 0.066245079040527 0.057722806930542
Output for 5.4.6
0.056588172912598 0.065430879592896 0.056922912597656
Output for 5.4.5
0.056663036346436 0.065495014190674 0.056931018829346
Output for 5.4.4
0.064108848571777 0.067193031311035 0.057639122009277
Output for 5.4.3
0.058634042739868 0.066654920578003 0.059937000274658
Output for 5.4.2
0.06020712852478 0.068666219711304 0.061327934265137
Output for 5.4.1
0.061304092407227 0.070152044296265 0.061775922775269
Output for 5.4.0
0.062090873718262 0.067193031311035 0.059119939804077
Output for 5.3.29
0.057218074798584 0.060594081878662 0.056502103805542
Output for 5.3.28
0.074100017547607 0.084368944168091 0.076109886169434
Output for 5.3.27
0.077326059341431 0.084754943847656 0.093983173370361
Output for 5.3.26
0.074316024780273 0.086016893386841 0.072263956069946
Output for 5.3.25
0.072061061859131 0.097913026809692 0.073267936706543
Output for 5.3.24
0.14365220069885 0.12371301651001 0.072774171829224
Output for 5.3.23
0.077337980270386 0.094149827957153 0.075459003448486
Output for 5.3.22
0.076730012893677 0.086013078689575 0.076057910919189
Output for 5.3.21
0.077242136001587 0.096270084381104 0.081038951873779
Output for 5.3.20
0.069220781326294 0.078888893127441 0.066179037094116
Output for 5.3.19
0.066766023635864 0.074809074401855 0.087560892105103
Output for 5.3.18
0.070441007614136 0.11342906951904 0.13618087768555
Output for 5.3.17
0.087727069854736 0.14755511283875 0.07634711265564
Output for 5.3.16
0.073222875595093 0.083723068237305 0.077176094055176
Output for 5.3.15
0.10693693161011 0.083649158477783 0.074051856994629
Output for 5.3.14
0.07146692276001 0.080614805221558 0.074858903884888
Output for 5.3.13
0.073807001113892 0.085027933120728 0.092705011367798
Output for 5.3.12
0.073869943618774 0.082564115524292 0.092757940292358
Output for 5.3.11
0.078050851821899 0.080238103866577 0.090566158294678
Output for 5.3.10
0.072437047958374 0.080124139785767 0.073019981384277
Output for 5.3.9
0.060673952102661 0.060312986373901 0.054186105728149
Output for 5.3.8
0.050060987472534 0.07420802116394 0.049003839492798
Output for 5.3.7
0.049241065979004 0.057411909103394 0.047012090682983
Output for 5.3.6
0.047486066818237 0.075345993041992 0.068883180618286
Output for 5.3.5
0.085872173309326 0.081902980804443 0.061264991760254
Output for 5.3.4
0.056963920593262 0.092996835708618 0.099152088165283
Output for 5.3.3
0.071438789367676 0.095384836196899 0.072336912155151
Output for 5.3.2
0.07305383682251 0.083822965621948 0.075482845306396
Output for 5.3.1
0.074741840362549 0.082760810852051 0.07112193107605
Output for 5.3.0
0.070391178131104 0.072640180587769 0.061479091644287
Output for 5.2.17
0.11516189575195 0.14693021774292 0.13490509986877
Output for 5.2.16
0.11569094657898 0.1742730140686 0.14478206634521
Output for 5.2.15
0.12293601036072 0.14948892593384 0.14170098304749
Output for 5.2.14
0.11470913887024 0.14579892158508 0.15871620178223
Output for 5.2.13
0.12081408500671 0.15439295768738 0.1399519443512
Output for 5.2.12
0.20574402809143 0.15410304069519 0.14075303077698
Output for 5.2.11
0.13903903961182 0.14018416404724 0.12726211547852
Output for 5.2.10
0.10243916511536 0.13480114936829 0.1346960067749
Output for 5.2.9
0.083482027053833 0.1256890296936 0.12223219871521
Output for 5.2.8
0.10388803482056 0.1374819278717 0.12833499908447
Output for 5.2.7
0.11238288879395 0.11317706108093 0.10676407814026
Output for 5.2.6
0.1092848777771 0.18244600296021 0.12967705726624
Output for 5.2.5
0.15374779701233 0.17337703704834 0.14071893692017
Output for 5.2.4
0.11559104919434 0.15164995193481 0.1760880947113
Output for 5.2.3
0.12620997428894 0.1918478012085 0.13259506225586
Output for 5.2.2
0.17000293731689 0.21150803565979 0.13863611221313
Output for 5.2.1
0.12652206420898 0.21555089950562 0.14539790153503
Output for 5.2.0
0.12523698806763 0.17799401283264 0.1478099822998
Output for 5.1.6
0.11007404327393 0.15687298774719 0.1444730758667
Output for 5.1.5
0.12880396842957 0.22977185249329 0.16217803955078
Output for 5.1.4
0.11959505081177 0.19848799705505 0.14466595649719
Output for 5.1.3
0.11159801483154 0.14974880218506 0.13612413406372
Output for 5.1.2
0.098568916320801 0.10522508621216 0.091353893280029
Output for 5.1.1
0.11774706840515 0.095465898513794 0.094883918762207
Output for 5.1.0
0.18006491661072 0.19204998016357 0.14235997200012
Output for 5.0.5
0.39209508895874 0.29699516296387 0.18564605712891
Output for 5.0.4
0.28175497055054 0.23211002349854 0.24423098564148
Output for 5.0.3
0.37608885765076 0.31268286705017 0.20472192764282
Output for 5.0.2
0.28399395942688 0.17330098152161 0.16114020347595
Output for 5.0.1
0.24405717849731 0.22527599334717 0.20499014854431
Output for 5.0.0
0.33603096008301 0.294508934021 0.29555988311768
Output for 4.4.9
0.35854 0.316385 -0.645636
Output for 4.4.8
0.39286 0.275431 -0.727031
Output for 4.4.7
0.354364 0.311338 -0.684886
Output for 4.4.6
0.330644 0.370254 -0.728015
Output for 4.4.5
0.314367 0.402867 -0.636307
Output for 4.4.4
0.429756 -0.67701 0.371769
Output for 4.4.3
-0.604882 0.328244 0.295456
Output for 4.4.2
-0.661718 0.226161 0.240734
Output for 4.4.1
0.451417 -0.633933 0.39761
Output for 4.4.0
-0.494461 0.340563 0.328724
Output for 4.3.11
0.346868 0.246202 0.228562
Output for 4.3.10
-0.726658 0.223397 0.203084
Output for 4.3.9
0.372858 -0.762514 0.21492
Output for 4.3.8
0.27773 0.22356 -0.685395
Output for 4.3.7
0.429086 0.261434 -0.675757
Output for 4.3.6
0.398929 -0.636388 0.357941
Output for 4.3.5
0.347103 -0.706719 0.222325
Output for 4.3.4
0.40654 -0.617591 0.369104
Output for 4.3.3
0.403945 -0.737078 0.303966
Output for 4.3.2
0.370269 -0.755776 0.28404
Output for 4.3.1
0.323164 -0.786399 0.193647
Output for 4.3.0
0.186443 0.144383 -0.855559