3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $n=9000000; $a=1; $b=2; $start=microtime(1); for($i=1;$i<=$n;$i++) { if ($a!=$b) $c=$a+$b;else $c=8; } print (microtime(1)-$start)."\n"; $start=microtime(1); for($i=1;$i<=$n;$i++) { $c=($a!=$b)?($a+$b):8; } print (microtime(1)-$start)."\n";
Output for 7.1.0
0.2012951374054 0.15336394309998
Output for 7.0.14
0.18473696708679 0.17585587501526
Output for 7.0.10
0.16946601867676 0.15588903427124
Output for 7.0.9
0.18733215332031 0.15811610221863
Output for 7.0.8
0.15769791603088 0.13544511795044
Output for 7.0.7
0.14825296401978 0.12637710571289
Output for 7.0.6
0.13054418563843 0.126384973526
Output for 7.0.5
0.17915606498718 0.16264986991882
Output for 7.0.4
0.16312098503113 0.17050290107727
Output for 7.0.3
0.16356801986694 0.17076182365417
Output for 7.0.2
0.17593097686768 0.15678882598877
Output for 7.0.1
0.17474293708801 0.16686487197876
Output for 7.0.0
0.16631984710693 0.16901612281799
Output for hhvm-3.12.0
1.1801829338074
Process exited with code 137.
Output for hhvm-3.10.0
1.7574489116669
Process exited with code 137.
Output for 5.6.28
0.40776896476746 0.51047706604004
Output for 5.6.25
0.40488314628601 0.39912700653076
Output for 5.6.24
0.40486001968384 0.39792990684509
Output for 5.6.23
0.38622283935547 0.39458107948303
Output for 5.6.22
0.33568596839905 0.32223606109619
Output for 5.6.21
0.31626915931702 0.31916117668152
Output for 5.6.20
0.38362407684326 0.39055681228638
Output for 5.6.19
0.38704895973206 0.42590308189392
Output for 5.6.18
0.39981603622437 0.38805389404297
Output for 5.6.17
0.3998692035675 0.39142417907715
Output for 5.6.16
0.37764716148376 0.39129590988159
Output for 5.6.15
0.40148210525513 0.38569116592407
Output for 5.6.14
0.39094614982605 0.39753890037537
Output for 5.6.13
0.38206100463867 0.38750195503235
Output for 5.6.12
0.38491201400757 0.38967800140381
Output for 5.6.11
0.36670613288879 0.38056588172913
Output for 5.6.10
0.38038992881775 0.38854694366455
Output for 5.6.9
0.36519384384155 0.3923602104187
Output for 5.6.8
0.38983583450317 0.38753008842468
Output for 5.6.7
0.37481093406677 0.36743402481079
Output for 5.6.6
0.38186812400818 0.38715481758118
Output for 5.6.5
0.3989360332489 0.31995105743408
Output for 5.6.4
0.38448882102966 0.38787007331848
Output for 5.6.3
0.39701199531555 0.40596103668213
Output for 5.6.2
0.40841603279114 0.38778495788574
Output for 5.6.1
0.38060307502747 0.42728710174561
Output for 5.6.0
0.38872194290161 0.38823294639587
Output for 5.5.38
0.37274503707886 0.36123013496399
Output for 5.5.37
0.37336206436157 0.35733890533447
Output for 5.5.36
0.31985998153687 0.35521507263184
Output for 5.5.35
0.30455899238586 0.32089781761169
Output for 5.5.34
0.39805197715759 0.40470814704895
Output for 5.5.33
0.37612509727478 0.38214707374573
Output for 5.5.32
0.39033913612366 0.37790298461914
Output for 5.5.31
0.3798508644104 0.36784791946411
Output for 5.5.30
0.37475490570068 0.38423109054565
Output for 5.5.29
0.40038299560547 0.40708804130554
Output for 5.5.28
0.38595008850098 0.3862829208374
Output for 5.5.27
0.39799809455872 0.36504316329956
Output for 5.5.26
0.33500599861145 0.32765603065491
Output for 5.5.25
0.38836812973022 0.38321685791016
Output for 5.5.24
0.39304208755493 0.38758897781372
Output for 5.5.23
0.3975510597229 0.38760995864868
Output for 5.5.22
0.4199960231781 0.38638806343079
Output for 5.5.21
0.39428901672363 0.38896489143372
Output for 5.5.20
0.30453109741211 0.32975506782532
Output for 5.5.19
0.37092423439026 0.38410401344299
Output for 5.5.18
0.34627318382263 0.31900191307068
Output for 5.5.16
0.39953303337097 0.38636302947998
Output for 5.5.15
0.30285882949829 0.32020211219788
Output for 5.5.14
0.35732507705688 0.32556796073914
Output for 5.5.13
0.32051396369934 0.32091403007507
Output for 5.5.12
0.38847494125366 0.40603685379028
Output for 5.5.11
0.39195108413696 0.40023183822632
Output for 5.5.10
0.37822008132935 0.40661406517029
Output for 5.5.9
0.37553381919861 0.38484692573547
Output for 5.5.8
0.37305402755737 0.38816809654236
Output for 5.5.7
0.40232110023499 0.38765406608582
Output for 5.5.6
0.38779282569885 0.38648390769958
Output for 5.5.5
0.37804985046387 0.38603091239929
Output for 5.5.4
0.38876485824585 0.38827681541443
Output for 5.5.3
0.31984686851501 0.32053518295288
Output for 5.5.2
0.3772759437561 0.38708996772766
Output for 5.5.1
0.37807512283325 0.36765503883362
Output for 5.5.0
0.37157797813416 0.36514186859131
Output for 5.4.45
0.38271307945251 0.39914107322693
Output for 5.4.44
0.38195085525513 0.4266140460968
Output for 5.4.43
0.40658712387085 0.35736703872681
Output for 5.4.42
0.3949990272522 0.39757490158081
Output for 5.4.41
0.36760282516479 0.33050107955933
Output for 5.4.40
0.47752404212952 0.39842104911804
Output for 5.4.39
0.4469199180603 0.3815770149231
Output for 5.4.38
0.37983798980713 0.39718413352966
Output for 5.4.37
0.39046406745911 0.39692997932434
Output for 5.4.36
0.33787798881531 0.32914400100708
Output for 5.4.35
0.39620685577393 0.39738702774048
Output for 5.4.34
0.3937029838562 0.39820003509521
Output for 5.4.32
0.41006207466125 0.4049699306488
Output for 5.4.31
0.30991077423096 0.32840609550476
Output for 5.4.30
0.31449699401855 0.33597898483276
Output for 5.4.29
0.30505895614624 0.32867312431335
Output for 5.4.28
0.33959484100342 0.32833504676819
Output for 5.4.27
0.39111089706421 0.3978099822998
Output for 5.4.26
0.38584589958191 0.39696502685547
Output for 5.4.25
0.38390779495239 0.39786696434021
Output for 5.4.24
0.40103816986084 0.40127301216125
Output for 5.4.23
0.3885498046875 0.39704704284668
Output for 5.4.22
0.39623212814331 0.39973211288452
Output for 5.4.21
0.39346790313721 0.399334192276
Output for 5.4.20
0.40082502365112 0.39685702323914
Output for 5.4.19
0.38381218910217 0.4140100479126
Output for 5.4.18
0.38975501060486 0.41690683364868
Output for 5.4.17
0.38645219802856 0.39974188804626
Output for 5.4.16
0.35496497154236 0.38149285316467
Output for 5.4.15
0.39056992530823 0.41942715644836
Output for 5.4.14
0.39059901237488 0.39511513710022
Output for 5.4.13
0.39711403846741 0.39606094360352
Output for 5.4.12
0.36601495742798 0.32572412490845
Output for 5.4.11
0.37155318260193 0.40905594825745
Output for 5.4.10
0.38294005393982 0.40030097961426
Output for 5.4.9
0.4038450717926 0.41491508483887
Output for 5.4.8
0.3907470703125 0.40058302879333
Output for 5.4.7
0.35092091560364 0.3270308971405
Output for 5.4.6
0.39751696586609 0.41020202636719
Output for 5.4.5
0.39095282554626 0.39807295799255
Output for 5.4.4
0.34815001487732 0.37378311157227
Output for 5.4.3
0.3992121219635 0.39824509620667
Output for 5.4.2
0.33256101608276 0.32775497436523
Output for 5.4.1
0.34488606452942 0.32873201370239
Output for 5.4.0
0.36013507843018 0.32869291305542
Output for 5.3.29
0.48414421081543 0.45905995368958
Output for 5.3.28
0.52295994758606 0.49937796592712
Output for 5.3.27
0.48987197875977 0.44765400886536
Output for 5.3.26
0.5487949848175 0.54140400886536
Output for 5.3.25
0.52060198783875 0.49289107322693
Output for 5.3.24
0.49481916427612 0.45610117912292
Output for 5.3.23
0.45176815986633 0.45645689964294
Output for 5.3.22
0.5420069694519 0.4900848865509
Output for 5.3.21
0.53185820579529 0.58665704727173
Output for 5.3.20
0.53504014015198 0.52042293548584
Output for 5.3.19
0.54330515861511 0.53452682495117
Output for 5.3.18
0.53534603118896 0.50470304489136
Output for 5.3.17
0.55243992805481 0.54537200927734
Output for 5.3.16
0.55186295509338 0.50904607772827
Output for 5.3.15
0.46185612678528 0.45648097991943
Output for 5.3.14
0.59768986701965 0.62741994857788
Output for 5.3.13
0.55250310897827 0.52762889862061
Output for 5.3.12
0.50237703323364 0.4645779132843
Output for 5.3.11
0.44269990921021 0.47131299972534
Output for 5.3.10
0.52956199645996 0.60630893707275
Output for 5.3.9
0.55391907691956 0.51749706268311
Output for 5.3.8
0.53889298439026 0.50919008255005
Output for 5.3.7
0.60349297523499 0.56660413742065
Output for 5.3.6
0.53391718864441 0.48007488250732
Output for 5.3.5
0.56040596961975 0.48943901062012
Output for 5.3.4
0.44112205505371 0.48085904121399
Output for 5.3.3
0.60892581939697 0.53082990646362
Output for 5.3.2
0.53980994224548 0.49629187583923
Output for 5.3.1
0.55354714393616 0.59581398963928
Output for 5.3.0
0.46696901321411 0.46903896331787
Output for 5.2.17
0.75694394111633 0.74608683586121
Output for 5.2.16
0.82568001747131 0.68819093704224
Output for 5.2.15
0.72203087806702 0.66641497612
Output for 5.2.14
0.83969593048096 0.66583609580994
Output for 5.2.13
0.74453091621399 0.75901103019714
Output for 5.2.12
0.83846592903137 0.69486594200134
Output for 5.2.11
0.79445195198059 0.66833114624023
Output for 5.2.10
0.81797194480896 0.69507694244385
Output for 5.2.9
0.83820796012878 0.69304394721985
Output for 5.2.8
0.71452403068542 0.69604706764221
Output for 5.2.7
0.70939707756042 0.69866609573364
Output for 5.2.6
0.92186999320984 0.7835168838501
Output for 5.2.5
0.83819007873535 0.69117283821106
Output for 5.2.4
0.82818913459778 0.68846917152405
Output for 5.2.3
0.72373223304749 0.66240906715393
Output for 5.2.2
0.85494709014893 0.86923813819885
Output for 5.2.1
0.74498414993286 0.59553194046021
Output for 5.2.0
0.82188296318054 0.68694996833801
Output for 5.1.6
0.8179669380188 0.7045259475708
Output for 5.1.5
0.69760012626648 0.70690083503723
Output for 5.1.4
0.80745315551758 0.68626809120178
Output for 5.1.3
0.79155397415161 0.72224307060242
Output for 5.1.2
0.8027138710022 0.67886304855347
Output for 5.1.1
0.82825613021851 0.67788600921631
Output for 5.1.0
0.82109880447388 0.69102597236633
Output for 4.3.0, 4.3.2 - 4.3.4, 4.3.6 - 4.3.10, 4.4.1 - 4.4.2, 4.4.4, 4.4.7 - 4.4.8, 5.0.0, 5.0.3 - 5.0.5

Process exited with code 137.
Output for 5.0.2
2.2147920131683
Process exited with code 137.
Output for 5.0.1
2.1616141796112
Process exited with code 137.
Output for 4.4.9
0.279782
Process exited with code 137.
Output for 4.4.6
0.279674
Process exited with code 137.
Output for 4.4.5
0.274772
Process exited with code 137.
Output for 4.4.3
0.083401
Process exited with code 137.
Output for 4.4.0
0.139187
Process exited with code 137.
Output for 4.3.11
0.311425
Process exited with code 137.
Output for 4.3.5
0.323049
Process exited with code 137.
Output for 4.3.1
0.096375
Process exited with code 137.