3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n=100000; $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).'<br>'; $start=microtime(1); for($i=1;$i<=$n;$i++) { $c=($a!=$b)?($a+$b):8; } print (microtime(1)-$start).'<br>';

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0100.01016.71
7.3.00.0170.00316.43
7.2.130.0090.00617.07
7.2.120.0000.01216.93
7.2.110.0070.01317.01
7.2.100.0090.00916.90
7.2.90.0030.01017.03
7.2.80.0030.01716.67
7.2.70.0120.00617.04
7.2.60.0030.01216.96
7.2.50.0100.00816.99
7.2.40.0070.01116.66
7.2.30.0030.02016.86
7.2.20.0030.01317.03
7.2.10.0100.01016.79
7.2.00.0060.01218.19
7.1.250.0030.02415.77
7.1.70.0000.01417.09
7.1.60.0130.02019.24
7.1.50.0040.01516.96
7.1.00.0100.07722.27
7.0.200.0050.00816.54
7.0.140.0000.08322.04
7.0.100.0530.09019.94
7.0.90.0130.07719.99
7.0.80.0130.08019.96
7.0.70.0070.08319.99
7.0.60.0130.06319.89
7.0.50.0070.09320.42
7.0.40.0100.08320.19
7.0.30.0100.07020.11
7.0.20.0170.07320.15
7.0.10.0100.09020.08
7.0.00.0100.08720.09
5.6.280.0100.08020.90
5.6.250.0030.09320.55
5.6.240.0100.09020.58
5.6.230.0070.10720.64
5.6.220.0130.09020.49
5.6.210.0130.07020.45
5.6.200.0070.09321.04
5.6.190.0170.08721.06
5.6.180.0030.09021.08
5.6.170.0130.08321.02
5.6.160.0100.09321.03
5.6.150.0070.08721.02
5.6.140.0100.08721.07
5.6.130.0100.09721.07
5.6.120.0070.09021.10
5.6.110.0070.10321.10
5.6.100.0100.07721.03
5.6.90.0130.08721.04
5.6.80.0170.08320.41
5.6.70.0100.08720.48
5.6.60.0000.08320.45
5.6.50.0000.10020.50
5.6.40.0070.09020.36
5.6.30.0100.09020.42
5.6.20.0200.08020.30
5.6.10.0100.07320.41
5.6.00.0070.08320.45
5.5.380.0130.08720.43
5.5.370.0100.10020.41
5.5.360.0070.09720.38
5.5.350.0070.09720.30
5.5.340.0100.09320.73
5.5.330.0100.05720.88
5.5.320.0130.09020.81
5.5.310.0100.09720.64
5.5.300.0070.09320.77
5.5.290.0070.10020.73
5.5.280.0030.09720.75
5.5.270.0100.09020.85
5.5.260.0030.07020.79
5.5.250.0100.09720.64
5.5.240.0170.06720.12
5.5.230.0070.09320.14
5.5.220.0130.09020.20
5.5.210.0130.08720.27
5.5.200.0100.08320.24
5.5.190.0000.09320.19
5.5.180.0070.09320.16
5.5.160.0200.05720.23
5.5.150.0170.09320.15
5.5.140.0070.06720.08
5.5.130.0130.08720.21
5.5.120.0100.09320.18
5.5.110.0070.09320.20
5.5.100.0170.08020.05
5.5.90.0100.08720.06
5.5.80.0130.09320.17
5.5.70.0070.08320.00
5.5.60.0070.09719.96
5.5.50.0030.09320.11
5.5.40.0130.07719.92
5.5.30.0100.08720.09
5.5.20.0130.08320.14
5.5.10.0170.08020.05
5.5.00.0100.06720.01
5.4.450.0130.06719.23
5.4.440.0100.05719.40
5.4.430.0030.09319.11
5.4.420.0070.08719.36
5.4.410.0070.08019.24
5.4.400.0100.09018.92
5.4.390.0230.08018.98
5.4.380.0100.07318.79
5.4.370.0100.08319.03
5.4.360.0030.10019.00
5.4.350.0000.10018.95
5.4.340.0100.07719.14
5.4.320.0130.08318.98
5.4.310.0070.09018.97
5.4.300.0100.07319.03
5.4.290.0130.08319.04
5.4.280.0070.07719.02
5.4.270.0130.08319.04
5.4.260.0000.08319.09
5.4.250.0070.08719.23
5.4.240.0130.07718.94
5.4.230.0100.06319.03
5.4.220.0030.08719.11
5.4.210.0070.08719.14
5.4.200.0100.09019.12
5.4.190.0100.05719.22
5.4.180.0070.08719.02
5.4.170.0100.09019.09
5.4.160.0030.08718.94
5.4.150.0100.07319.13
5.4.140.0070.08316.38
5.4.130.0100.07716.12
5.4.120.0030.09316.35
5.4.110.0070.08716.23
5.4.100.0030.09016.34
5.4.90.0030.08316.27
5.4.80.0070.08016.33
5.4.70.0070.08316.37
5.4.60.0130.08016.24
5.4.50.0030.09016.18
5.4.40.0030.08016.33
5.4.30.0070.08716.33
5.4.20.0130.08316.33
5.4.10.0000.09016.39
5.4.00.0000.09315.73
5.3.290.0100.09314.62
5.3.280.0070.09314.45
5.3.270.0030.08714.61
5.3.260.0030.07714.45
5.3.250.0130.09014.58
5.3.240.0130.08314.60
5.3.230.0100.07314.58
5.3.220.0070.06314.58
5.3.210.0070.08314.55
5.3.200.0100.08714.56
5.3.190.0070.08714.48
5.3.180.0100.09014.56
5.3.170.0030.10014.44
5.3.160.0130.08714.59
5.3.150.0100.07714.55
5.3.140.0130.09714.52
5.3.130.0100.09314.55
5.3.120.0000.10714.41
5.3.110.0070.09714.52
5.3.100.0070.09713.97
5.3.90.0100.08713.87
5.3.80.0070.08313.87
5.3.70.0130.08713.87
5.3.60.0130.09013.86
5.3.50.0030.09313.81
5.3.40.0030.09013.73
5.3.30.0070.09013.90
5.3.20.0000.09313.65
5.3.10.0030.09713.62
5.3.00.0000.08313.64
5.2.170.0130.07711.18
5.2.160.0030.08311.09
5.2.150.0000.09710.94
5.2.140.0070.08711.16
5.2.130.0070.09310.96
5.2.120.0070.09011.14
5.2.110.0100.08011.05
5.2.100.0030.07310.95
5.2.90.0100.05011.14
5.2.80.0100.04311.01
5.2.70.0070.08011.16
5.2.60.0070.06011.00
5.2.50.0030.04711.00
5.2.40.0070.05310.95
5.2.30.0000.05710.90
5.2.20.0130.06710.90
5.2.10.0030.06010.90
5.2.00.0070.06010.90
5.1.60.0030.04310.90
5.1.50.0000.04710.90
5.1.40.0070.03710.90
5.1.30.0000.06310.90
5.1.20.0030.04710.90
5.1.10.0030.08710.90
5.1.00.0000.05010.90
5.0.50.0000.08010.90
5.0.40.0000.07710.90
5.0.30.0070.11010.90
5.0.20.0030.07310.90
5.0.10.0100.11710.90
5.0.00.0000.14010.90
4.4.90.0000.07310.90
4.4.80.0000.08010.90
4.4.70.0000.07010.90
4.4.60.0000.07710.90
4.4.50.0000.07710.90
4.4.40.0000.10010.90
4.4.30.0070.07010.90
4.4.20.0030.07010.90
4.4.10.0000.07010.90
4.4.00.0000.11310.90
4.3.110.0000.07310.90
4.3.100.0070.11010.90
4.3.90.0000.08010.90
4.3.80.0000.09710.90
4.3.70.0000.07310.90
4.3.60.0000.12310.90
4.3.50.0000.06310.90
4.3.40.0030.07710.90
4.3.30.0030.06310.90
4.3.20.0030.08710.90
4.3.10.0100.05710.90
4.3.00.0000.12310.90

preferences:
43.94 ms | 401 KiB | 5 Q