3v4l.org

run code in 300+ PHP versions simultaneously
<?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.4.1
0.18134784698486 0.24477887153625
Output for 7.4.0
0.16625690460205 0.18886113166809
Output for 7.3.13
0.20215702056885 0.27731108665466
Output for 7.3.12
0.26188588142395 0.27309703826904
Output for 7.3.11
0.27495002746582 0.20077610015869
Output for 7.3.10
0.20208501815796 0.2057888507843
Output for 7.3.9
0.23892307281494 0.27328705787659
Output for 7.3.8
0.2230908870697 0.18564391136169
Output for 7.3.7
0.19475388526917 0.19562792778015
Output for 7.3.6
0.22584390640259 0.21466493606567
Output for 7.3.5
0.24829602241516 0.28986096382141
Output for 7.3.4
0.1899950504303 0.29936003684998
Output for 7.3.3
0.18488502502441 0.20102095603943
Output for 7.3.2
0.18630599975586 0.19949316978455
Output for 7.3.1
0.25684189796448 0.25914907455444
Output for 7.3.0
0.26093292236328 0.2797589302063
Output for 7.2.26
0.18281197547913 0.1942138671875
Output for 7.2.25
0.28650593757629 0.28058218955994
Output for 7.2.24
0.2720742225647 0.18765497207642
Output for 7.2.23
0.18867111206055 0.246169090271
Output for 7.2.22
0.27642583847046 0.25836706161499
Output for 7.2.21
0.2211229801178 0.22598505020142
Output for 7.2.20
0.28341794013977 0.23052501678467
Output for 7.2.19
0.27518677711487 0.23517918586731
Output for 7.2.18
0.18630814552307 0.20383191108704
Output for 7.2.17
0.18079090118408 0.18770098686218
Output for 7.2.16
0.27179718017578 0.29400491714478
Output for 7.2.15
0.25954008102417 0.29008507728577
Output for 7.2.14
0.18471097946167 0.19690799713135
Output for 7.2.13
0.26385593414307 0.28398394584656
Output for 7.2.12
0.205482006073 0.20393204689026
Output for 7.2.11
0.26071405410767 0.28067207336426
Output for 7.2.10
0.18775296211243 0.18194007873535
Output for 7.2.9
0.18511009216309 0.19800519943237
Output for 7.2.8
0.23847389221191 0.26763701438904
Output for 7.2.7
0.21856307983398 0.19659495353699
Output for 7.2.6
0.27260780334473 0.29042196273804
Output for 7.2.5
0.2566180229187 0.27727389335632
Output for 7.2.4
0.27336692810059 0.29222512245178
Output for 7.2.3
0.27364683151245 0.23683595657349
Output for 7.2.2
0.26014399528503 0.28114891052246
Output for 7.2.1
0.26645016670227 0.25200605392456
Output for 7.2.0
0.18501210212708 0.20232009887695
Output for 7.1.33
0.63673090934753 0.72337508201599
Output for 7.1.32
0.65516495704651 0.85142302513123
Output for 7.1.31
0.66685080528259 0.74647498130798
Output for 7.1.30
0.82572603225708 0.83314299583435
Output for 7.1.29
0.66911506652832 0.73828101158142
Output for 7.1.28
0.82327914237976 0.84072279930115
Output for 7.1.27
0.82541608810425 0.92842602729797
Output for 7.1.26
0.82316207885742 0.91568899154663
Output for 7.1.25
0.62687802314758 0.93195700645447
Output for 7.1.24
0.82503509521484 0.89074802398682
Output for 7.1.23
0.70854496955872 0.7168390750885
Output for 7.1.22
0.68491697311401 0.71538114547729
Output for 7.1.21
0.79910397529602 0.92363595962524
Output for 7.1.20
0.70474100112915 0.69837212562561
Output for 7.1.19
0.78362703323364 0.74161791801453
Output for 7.1.18
0.77698993682861 0.93111300468445
Output for 7.1.17
0.8116340637207 0.7431538105011
Output for 7.1.16
0.83278298377991 0.93700790405273
Output for 7.1.15
0.75824403762817 0.91173601150513
Output for 7.1.14
0.64896202087402 0.89745211601257
Output for 7.1.13
0.8066680431366 0.9473569393158
Output for 7.1.12
0.79837393760681 0.94188690185547
Output for 7.1.11
0.62854099273682 0.81360101699829
Output for 7.1.10
0.76224184036255 0.92774486541748
Output for 7.1.9
0.74568891525269 0.80048298835754
Output for 7.1.8
0.72122383117676 0.69467306137085
Output for 7.1.7
0.67100691795349 0.76518487930298
Output for 7.1.6
0.82430791854858 0.8061740398407
Output for 7.1.5
0.65301203727722 0.73188090324402
Output for 7.1.4
0.64586901664734 0.87204504013062
Output for 7.1.3
0.8011679649353 0.71680283546448
Output for 7.1.2
0.79770684242249 0.93111491203308
Output for 7.1.1
0.82223200798035 0.94334101676941
Output for 7.1.0
0.69944095611572 0.92852401733398
Output for 7.0.33
0.71921992301941 0.73625802993774
Output for 7.0.32
0.81291007995605 0.94301104545593
Output for 7.0.31
0.82056188583374 0.90112996101379
Output for 7.0.30
0.6831750869751 0.69727683067322
Output for 7.0.29
0.80602693557739 0.69117784500122
Output for 7.0.28
0.63706302642822 0.73122596740723
Output for 7.0.27
0.81308507919312 0.72076892852783
Output for 7.0.26
0.81665301322937 0.74100518226624
Output for 7.0.25
0.87612700462341 0.72481393814087
Output for 7.0.24
0.8248119354248 0.90877103805542
Output for 7.0.23
0.8385591506958 0.89862084388733
Output for 7.0.22
0.71138405799866 0.72486209869385
Output for 7.0.21
0.81095004081726 0.94591188430786
Output for 7.0.20
0.78496694564819 0.90190005302429
Output for 7.0.19
0.69330716133118 0.73490405082703
Output for 7.0.18
0.83334589004517 0.83755898475647
Output for 7.0.17
0.82000184059143 0.75216293334961
Output for 7.0.16
0.78644704818726 0.79930996894836
Output for 7.0.15
0.82385587692261 0.76240086555481
Output for 7.0.14
0.82103610038757 0.73447608947754
Output for 7.0.13
0.82263803482056 0.80289101600647
Output for 7.0.12
0.83841586112976 0.85891699790955
Output for 7.0.11
0.83657193183899 0.94456100463867
Output for 7.0.10
0.8083701133728 0.94283986091614
Output for 7.0.9
0.7323009967804 0.84302091598511
Output for 7.0.8
0.83396482467651 0.94105696678162
Output for 7.0.7
0.83538389205933 0.92244720458984
Output for 7.0.6
0.76947498321533 0.73994302749634
Output for 7.0.5
0.84367513656616 0.80714201927185
Output for 7.0.4
0.8342399597168 0.91576313972473
Output for 7.0.3
0.8411500453949 0.82126688957214
Output for 7.0.2
0.73435592651367 0.7602071762085
Output for 7.0.1
0.81223106384277 0.9441921710968
Output for 7.0.0
0.83659696578979 0.94254183769226
Output for 5.6.40
1.5165739059448
Process exited with code 137.
Output for 5.6.39
1.6184039115906
Process exited with code 137.
Output for 5.6.38
1.6560699939728
Process exited with code 137.
Output for 5.6.37
1.4379870891571
Process exited with code 137.
Output for 5.6.36
1.6342778205872
Process exited with code 137.
Output for 5.6.35
1.6145339012146
Process exited with code 137.
Output for 5.6.34
1.5434329509735
Process exited with code 137.
Output for 5.6.33
1.6016042232513
Process exited with code 137.
Output for 5.6.32
1.632159948349
Process exited with code 137.
Output for 5.6.31
1.6311419010162
Process exited with code 137.
Output for 5.6.30
1.6493039131165
Process exited with code 137.
Output for 5.6.29
1.4969820976257
Process exited with code 137.
Output for 5.6.28
1.5948390960693
Process exited with code 137.
Output for 5.6.27
1.4577310085297
Process exited with code 137.
Output for 5.6.26
1.4214060306549
Process exited with code 137.
Output for 5.6.25
1.6152107715607
Process exited with code 137.
Output for 5.6.24
1.6108400821686
Process exited with code 137.
Output for 5.6.23
1.6924750804901
Process exited with code 137.
Output for 5.6.22
1.4243030548096
Process exited with code 137.
Output for 5.6.21
1.4596118927002
Process exited with code 137.
Output for 5.6.20
1.5480890274048
Process exited with code 137.
Output for 5.6.19
1.6678218841553
Process exited with code 137.
Output for 5.6.18
1.6026020050049
Process exited with code 137.
Output for 5.6.17
1.6121499538422
Process exited with code 137.
Output for 5.6.16
1.477912902832
Process exited with code 137.
Output for 5.6.15
1.5407299995422
Process exited with code 137.
Output for 5.6.14
1.575443983078
Process exited with code 137.
Output for 5.6.13
1.5077159404755
Process exited with code 137.
Output for 5.6.12
1.5798709392548
Process exited with code 137.
Output for 5.6.11
1.4722898006439
Process exited with code 137.
Output for 5.6.10
1.6724290847778
Process exited with code 137.
Output for 5.6.9
1.595046043396
Process exited with code 137.
Output for 5.6.8
1.6618409156799
Process exited with code 137.
Output for 5.6.7
1.5580220222473
Process exited with code 137.
Output for 5.6.6
1.5899038314819
Process exited with code 137.
Output for 5.6.5
1.6163849830627
Process exited with code 137.
Output for 5.6.4
1.6669819355011
Process exited with code 137.
Output for 5.6.3
1.4662311077118
Process exited with code 137.
Output for 5.6.2
1.5014479160309
Process exited with code 137.
Output for 5.6.1
1.6784720420837
Process exited with code 137.
Output for 5.6.0
1.6362299919128
Process exited with code 137.
Output for 5.5.38
1.6068258285522
Process exited with code 137.
Output for 5.5.37
1.5998520851135
Process exited with code 137.
Output for 5.5.36
1.6949999332428
Process exited with code 137.
Output for 5.5.35
1.5806500911713
Process exited with code 137.
Output for 5.5.34
1.5495848655701
Process exited with code 137.
Output for 5.5.33
1.7152900695801
Process exited with code 137.
Output for 5.5.32
1.6836149692535
Process exited with code 137.
Output for 5.5.31
1.6016309261322
Process exited with code 137.
Output for 5.5.30
1.6822099685669
Process exited with code 137.
Output for 5.5.29
1.6727380752563
Process exited with code 137.
Output for 5.5.28
1.6934711933136
Process exited with code 137.
Output for 5.5.27
1.5845761299133
Process exited with code 137.
Output for 5.5.26
1.6805131435394
Process exited with code 137.
Output for 5.5.25
1.5527141094208
Process exited with code 137.
Output for 5.5.24
1.5763731002808
Process exited with code 137.
Output for 5.5.23
1.4517171382904
Process exited with code 137.
Output for 5.5.22
1.5798759460449
Process exited with code 137.
Output for 5.5.21
1.6837289333344
Process exited with code 137.
Output for 5.5.20
1.5642099380493
Process exited with code 137.
Output for 5.5.19
1.6593151092529
Process exited with code 137.
Output for 5.5.18
1.6721448898315
Process exited with code 137.
Output for 5.5.17
1.6650700569153
Process exited with code 137.
Output for 5.5.16
1.6130299568176
Process exited with code 137.
Output for 5.5.15
1.6442160606384
Process exited with code 137.
Output for 5.5.14
1.5858950614929
Process exited with code 137.
Output for 5.5.13
1.482409954071
Process exited with code 137.
Output for 5.5.12
1.6876349449158
Process exited with code 137.
Output for 5.5.11
1.6888308525085
Process exited with code 137.
Output for 5.5.10
1.6404349803925
Process exited with code 137.
Output for 5.5.9
1.6787619590759
Process exited with code 137.
Output for 5.5.8
1.5005040168762
Process exited with code 137.
Output for 5.5.7
1.4924650192261
Process exited with code 137.
Output for 5.5.6
1.6029918193817
Process exited with code 137.
Output for 5.5.5
1.6315200328827
Process exited with code 137.
Output for 5.5.4
1.6467161178589
Process exited with code 137.
Output for 5.5.3
1.6561980247498
Process exited with code 137.
Output for 5.5.2
1.6847438812256
Process exited with code 137.
Output for 5.5.1
1.5925550460815
Process exited with code 137.
Output for 5.5.0
1.6353931427002
Process exited with code 137.
Output for 5.4.45
1.6837389469147
Process exited with code 137.
Output for 5.4.44
1.5776379108429
Process exited with code 137.
Output for 5.4.43
1.521183013916
Process exited with code 137.
Output for 5.4.42
1.6701850891113
Process exited with code 137.
Output for 5.4.41
1.7023069858551
Process exited with code 137.
Output for 5.4.40
1.4275181293488
Process exited with code 137.
Output for 5.4.39
1.6989240646362
Process exited with code 137.
Output for 5.4.38
1.5510020256042
Process exited with code 137.
Output for 5.4.37
1.657299041748
Process exited with code 137.
Output for 5.4.36
1.6593849658966
Process exited with code 137.
Output for 5.4.35
1.6549289226532
Process exited with code 137.
Output for 5.4.34
1.6595160961151
Process exited with code 137.
Output for 5.4.33
1.6886851787567
Process exited with code 137.
Output for 5.4.32
1.5011279582977
Process exited with code 137.
Output for 5.4.31
1.6908810138702
Process exited with code 137.
Output for 5.4.30
1.5902259349823
Process exited with code 137.
Output for 5.4.29
1.6357269287109
Process exited with code 137.
Output for 5.4.28
1.6008989810944
Process exited with code 137.
Output for 5.4.27
1.6987228393555
Process exited with code 137.
Output for 5.4.26
1.7817590236664
Process exited with code 137.
Output for 5.4.25
1.6919798851013
Process exited with code 137.
Output for 5.4.24
1.6983489990234
Process exited with code 137.
Output for 5.4.23
1.6846477985382
Process exited with code 137.
Output for 5.4.22
1.6953580379486
Process exited with code 137.
Output for 5.4.21
1.5917739868164
Process exited with code 137.
Output for 5.4.20
1.5005149841309
Process exited with code 137.
Output for 5.4.19
1.6840388774872
Process exited with code 137.
Output for 5.4.18
1.6933407783508
Process exited with code 137.
Output for 5.4.17
1.5522019863129
Process exited with code 137.
Output for 5.4.16
1.6968619823456
Process exited with code 137.
Output for 5.4.15
1.7439739704132
Process exited with code 137.
Output for 5.4.14
1.5318250656128
Process exited with code 137.
Output for 5.4.13
1.686527967453
Process exited with code 137.
Output for 5.4.12
1.7064979076385
Process exited with code 137.
Output for 5.4.11
1.709242105484
Process exited with code 137.
Output for 5.4.10
1.7709519863129
Process exited with code 137.
Output for 5.4.9
1.6984360218048
Process exited with code 137.
Output for 5.4.8
1.4722301959991
Process exited with code 137.
Output for 5.4.7
1.4914510250092
Process exited with code 137.
Output for 5.4.6
1.6210608482361
Process exited with code 137.
Output for 5.4.5
1.671541929245
Process exited with code 137.
Output for 5.4.4
1.707535982132
Process exited with code 137.
Output for 5.4.3
1.6815500259399
Process exited with code 137.
Output for 5.4.2
1.6695520877838
Process exited with code 137.
Output for 5.4.1
1.7000019550323
Process exited with code 137.
Output for 5.4.0
1.6565518379211
Process exited with code 137.
Output for 5.3.29
1.9251990318298
Process exited with code 137.
Output for 5.3.28
1.9470791816711
Process exited with code 137.
Output for 5.3.27
1.8365700244904
Process exited with code 137.
Output for 5.3.26
2.0235011577606
Process exited with code 137.
Output for 5.3.25
1.8424470424652
Process exited with code 137.
Output for 5.3.24
2.0463302135468
Process exited with code 137.
Output for 5.3.23
2.0504171848297
Process exited with code 137.
Output for 5.3.22
1.9600470066071
Process exited with code 137.
Output for 5.3.21
1.7083220481873
Process exited with code 137.
Output for 5.3.20
2.04914021492
Process exited with code 137.
Output for 5.3.19
1.6386981010437
Process exited with code 137.
Output for 5.3.18
2.0475749969482
Process exited with code 137.
Output for 5.3.17
1.7139620780945
Process exited with code 137.
Output for 5.3.16
1.8537511825562
Process exited with code 137.
Output for 5.3.15
1.6517601013184
Process exited with code 137.
Output for 5.3.14
1.8290441036224
Process exited with code 137.
Output for 5.3.13
1.9410300254822
Process exited with code 137.
Output for 5.3.12
1.6583151817322
Process exited with code 137.
Output for 5.3.11
1.7650032043457
Process exited with code 137.
Output for 5.3.10
1.6198530197144
Process exited with code 137.
Output for 5.3.9
2.0241031646729
Process exited with code 137.
Output for 5.3.8
2.0677270889282
Process exited with code 137.
Output for 5.3.7
2.0047340393066
Process exited with code 137.
Output for 5.3.6
1.7421140670776
Process exited with code 137.
Output for 5.3.5
1.6397771835327
Process exited with code 137.
Output for 5.3.4
2.0094480514526
Process exited with code 137.
Output for 5.3.3
1.7626600265503
Process exited with code 137.
Output for 5.3.2
1.7950570583344
Process exited with code 137.
Output for 5.3.1
1.6030290126801
Process exited with code 137.
Output for 5.3.0
1.7650461196899
Process exited with code 137.
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.0 - 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.

preferences:
258.46 ms | 401 KiB | 325 Q