3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $n=10000000; $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.20041799545288 0.1726279258728
Output for 7.0.14
-0.11661314964294 -0.21065998077393
Output for 7.0.7
0.19624209403992 0.17869806289673
Output for 7.0.6
0.19726800918579 0.20140385627747
Output for 7.0.5
0.14374399185181 0.14782905578613
Output for 7.0.4
0.2021369934082 0.17638778686523
Output for 7.0.3
0.14746594429016 0.15319108963013
Output for 7.0.2
0.18244504928589 0.17413997650146
Output for 7.0.1
0.18578290939331 0.18754506111145
Output for 7.0.0
0.19294023513794 0.18865013122559
Output for hhvm-3.12.0
0.88148903846741 0.76031303405762
Output for hhvm-3.10.0
0.84640789031982 0.8463180065155
Output for 5.6.28
-0.11914300918579 1.2361271381378
Output for 5.6.22
0.4469039440155 0.43275189399719
Output for 5.6.21
0.43470406532288 0.43605208396912
Output for 5.6.20
0.44834113121033 0.42740797996521
Output for 5.6.19
0.35376596450806 0.36130499839783
Output for 5.6.18
0.43905210494995 0.43856501579285
Output for 5.6.17
0.44679021835327 0.42855501174927
Output for 5.6.16
0.41160988807678 0.36142706871033
Output for 5.6.15
0.43061494827271 0.43058896064758
Output for 5.6.14
0.44506907463074 0.4400908946991
Output for 5.6.13
0.44019508361816 0.41165995597839
Output for 5.6.12
0.4423611164093 0.43086290359497
Output for 5.6.11
0.38084006309509 0.35907006263733
Output for 5.6.10
0.52523589134216 0.49846601486206
Output for 5.6.9
0.40601515769958 0.35476112365723
Output for 5.6.8
0.44010877609253 0.43834376335144
Output for 5.6.7
0.46085500717163 0.45039701461792
Output for 5.6.6
0.36583304405212 0.35343813896179
Output for 5.6.5
0.39214611053467 0.35387516021729
Output for 5.6.4
0.41991114616394 0.4260630607605
Output for 5.6.3
0.46139407157898 0.44654393196106
Output for 5.6.2
0.43263816833496 0.43005895614624
Output for 5.6.1
0.46755814552307 0.43531584739685
Output for 5.6.0
0.44547009468079 0.52474808692932
Output for 5.5.36
0.43107199668884 0.43331789970398
Output for 5.5.35
0.42802596092224 0.42721891403198
Output for 5.5.34
0.42577695846558 0.42371082305908
Output for 5.5.33
0.42836308479309 0.43572807312012
Output for 5.5.32
0.44605183601379 0.43256688117981
Output for 5.5.31
0.47409009933472 0.47254395484924
Output for 5.5.30
0.42993998527527 0.43050217628479
Output for 5.5.29
0.37951397895813 0.35358500480652
Output for 5.5.28
0.44023704528809 0.43807196617126
Output for 5.5.27
0.44695496559143 0.42784214019775
Output for 5.5.26
0.42562317848206 0.41719818115234
Output for 5.5.25
0.43759512901306 0.44871616363525
Output for 5.5.24
0.43750596046448 0.42922711372375
Output for 5.5.23
0.37161588668823 0.36219310760498
Output for 5.5.22
0.33674812316895 0.35417699813843
Output for 5.5.21
0.34063100814819 0.35571885108948
Output for 5.5.20
0.36233901977539 0.35292410850525
Output for 5.5.19
0.43139600753784 0.42593502998352
Output for 5.5.18
0.33986520767212 0.35244989395142
Output for 5.5.16
0.43234896659851 0.42771196365356
Output for 5.5.15
0.42305588722229 0.42393803596497
Output for 5.5.14
0.4326159954071 0.42531800270081
Output for 5.5.13
0.37131094932556 0.35831093788147
Output for 5.5.12
0.37966084480286 0.36982107162476
Output for 5.5.11
0.44710779190063 0.43215203285217
Output for 5.5.10
0.35657286643982 0.35380291938782
Output for 5.5.9
0.42997407913208 0.42878293991089
Output for 5.5.8
0.4292299747467 0.42900490760803
Output for 5.5.7
0.44546794891357 0.4387309551239
Output for 5.5.6
0.36606121063232 0.3523280620575
Output for 5.5.5
0.43705987930298 0.42713403701782
Output for 5.5.4
0.46038794517517 0.43669199943542
Output for 5.5.3
0.39102005958557 0.36427998542786
Output for 5.5.2
0.33635711669922 0.35311007499695
Output for 5.5.1
0.4414210319519 0.43062400817871
Output for 5.5.0
0.46599102020264 0.4459228515625
Output for 5.4.45
0.36465907096863 0.36686086654663
Output for 5.4.44
0.45540904998779 0.45086002349854
Output for 5.4.43
0.44270396232605 0.44990706443787
Output for 5.4.42
0.37686800956726 0.37742495536804
Output for 5.4.41
0.42369294166565 0.43033289909363
Output for 5.4.40
0.37239599227905 0.36359405517578
Output for 5.4.39
0.42586898803711 0.44020509719849
Output for 5.4.38
0.41744709014893 0.42882204055786
Output for 5.4.37
0.41037201881409 0.36686396598816
Output for 5.4.36
0.34744381904602 0.37103605270386
Output for 5.4.35
0.43001008033752 0.45366096496582
Output for 5.4.34
0.45660901069641 0.45735311508179
Output for 5.4.32
0.45014595985413 0.43957901000977
Output for 5.4.31
0.47813606262207 0.43903112411499
Output for 5.4.30
0.36695313453674 0.37310409545898
Output for 5.4.29
0.42040395736694 0.42513918876648
Output for 5.4.28
0.45521402359009 0.43759608268738
Output for 5.4.27
0.3720338344574 0.36194705963135
Output for 5.4.26
0.3822181224823 0.36262106895447
Output for 5.4.25
0.36621689796448 0.36610889434814
Output for 5.4.24
0.36586999893188 0.36358714103699
Output for 5.4.23
0.33615899085999 0.3625500202179
Output for 5.4.22
0.4419538974762 0.44063806533813
Output for 5.4.21
0.43757581710815 0.44052290916443
Output for 5.4.20
0.45412015914917 0.43928503990173
Output for 5.4.19
0.39440107345581 0.36228203773499
Output for 5.4.18
0.45021390914917 0.44659495353699
Output for 5.4.17
0.33605003356934 0.36272096633911
Output for 5.4.16
0.44820594787598 0.44030499458313
Output for 5.4.15
0.43693614006042 0.4401068687439
Output for 5.4.14
0.44381904602051 0.40771102905273
Output for 5.4.13
0.44328093528748 0.43780899047852
Output for 5.4.12
0.40903377532959 0.37572288513184
Output for 5.4.11
0.35125708580017 0.37582516670227
Output for 5.4.10
0.33614706993103 0.382159948349
Output for 5.4.9
0.40390110015869 0.36302304267883
Output for 5.4.8
0.44888806343079 0.4389967918396
Output for 5.4.7
0.33630204200745 0.36361193656921
Output for 5.4.6
0.40961217880249 0.36175203323364
Output for 5.4.5
0.43305802345276 0.43787884712219
Output for 5.4.4
0.45687913894653 0.4560558795929
Output for 5.4.3
0.4420759677887 0.45935797691345
Output for 5.4.2
0.42465400695801 0.43128204345703
Output for 5.4.1
0.4496328830719 0.43912982940674
Output for 5.4.0
0.44209504127502 0.43833112716675
Output for 5.3.29
0.59949803352356 0.55812001228333
Output for 5.3.28
0.57131099700928 0.52728915214539
Output for 5.3.27
0.52377891540527 0.50376105308533
Output for 5.3.26
0.52225804328918 0.50258708000183
Output for 5.3.25
0.50826907157898 0.5180389881134
Output for 5.3.24
0.59045386314392 0.5680079460144
Output for 5.3.23
0.59511590003967 0.54266381263733
Output for 5.3.22
0.49897003173828 0.55476212501526
Output for 5.3.21
0.59025812149048 0.52459001541138
Output for 5.3.20
0.60208415985107 0.53695487976074
Output for 5.3.19
0.54681396484375 0.51377296447754
Output for 5.3.18
0.77865600585938 0.57590985298157
Output for 5.3.17
0.60626697540283 0.57141208648682
Output for 5.3.16
0.47284722328186 0.50553607940674
Output for 5.3.15
0.68737697601318 0.61601710319519
Output for 5.3.14
0.51955199241638 0.50779700279236
Output for 5.3.13
0.59937000274658 0.53865504264832
Output for 5.3.12
0.48522090911865 0.53199696540833
Output for 5.3.11
0.47441506385803 0.51292896270752
Output for 5.3.10
0.62932014465332 0.59643602371216
Output for 5.3.9
0.61199188232422 0.59586596488953
Output for 5.3.8
0.62330985069275 0.5760350227356
Output for 5.3.7
0.62013506889343 0.56276488304138
Output for 5.3.6
0.63737297058105 0.58850288391113
Output for 5.3.5
0.6259651184082 0.56882905960083
Output for 5.3.4
0.50264692306519 0.50242614746094
Output for 5.3.3
0.60683608055115 0.56919503211975
Output for 5.3.2
0.62644910812378 0.56691217422485
Output for 5.3.1
0.63880896568298 0.59601998329163
Output for 5.3.0
0.67179989814758 0.58294296264648
Output for 5.2.17
0.91868996620178 0.75184893608093
Output for 5.2.16
0.925616979599 0.73637008666992
Output for 5.2.15
0.94790387153625 0.74043202400208
Output for 5.2.14
0.9353129863739 0.74048709869385
Output for 5.2.13
0.89689207077026 0.75808191299438
Output for 5.2.12
0.82829999923706 0.73507189750671
Output for 5.2.11
0.7489550113678 0.72431993484497
Output for 5.2.10
0.90824007987976 0.75494003295898
Output for 5.2.9
0.92202997207642 0.77533316612244
Output for 5.2.8
0.77139210700989 0.7331371307373
Output for 5.2.7
0.7705090045929 0.72067618370056
Output for 5.2.6
0.76717305183411 0.73696112632751
Output for 5.2.5
0.86726903915405 0.72850298881531
Output for 5.2.4
0.93618416786194 0.75885796546936
Output for 5.2.3
0.89817810058594 0.7406599521637
Output for 5.2.2
0.91832184791565 0.75579309463501
Output for 5.2.1
0.84652900695801 0.66296195983887
Output for 5.2.0
0.92293405532837 0.75317192077637
Output for 5.1.6
0.77077198028564 0.74820613861084
Output for 5.1.5
0.98308300971985 0.78427505493164
Output for 5.1.4
0.9441249370575 0.80749988555908
Output for 5.1.3
0.9200599193573 0.75400018692017
Output for 5.1.2
0.8155529499054 0.75815200805664
Output for 5.1.1
0.94447112083435 0.76148796081543
Output for 5.1.0
0.93436694145203 0.76799893379211
Output for 4.3.0 - 4.3.2, 4.3.6 - 4.3.9, 4.3.11 - 4.4.8, 5.0.0 - 5.0.1, 5.0.3 - 5.0.5

Process exited with code 137.
Output for 5.0.2
2.405357837677
Process exited with code 137.
Output for 4.4.9
0.422448
Process exited with code 137.
Output for 4.3.10
0.392703
Process exited with code 137.
Output for 4.3.5
0.372698
Process exited with code 137.
Output for 4.3.4
0.389435
Process exited with code 137.
Output for 4.3.3
0.350137
Process exited with code 137.