3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Ratings { const K = 32; private $rating1; private $rating2; public function __construct($rating1, $rating2) { $this->rating1 = $rating1; $this->rating2 = $rating2; } public function calculateChange() { return 1 / (1 + pow(10, ($rating2 - $rating1) / 400)) * 100; } } echo (new Ratings(4, 5))->calculateChange() . "%";

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)
8.3.70.0090.00616.63
8.3.60.0110.00716.63
8.3.50.0100.00822.11
8.3.40.0090.00618.99
8.3.30.0060.00918.91
8.3.20.0040.00420.35
8.3.10.0000.00721.85
8.3.00.0030.00619.38
8.2.190.0040.01116.58
8.2.180.0120.00618.66
8.2.170.0070.00722.96
8.2.160.0060.00820.34
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00019.66
8.2.110.0030.00622.07
8.2.100.0070.00417.63
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0060.00318.05
8.2.50.0050.00318.07
8.2.40.0000.01120.10
8.2.30.0040.00417.94
8.2.20.0080.00017.80
8.2.10.0000.00717.96
8.2.00.0050.00217.64
8.1.280.0090.00625.92
8.1.270.0030.00618.71
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00623.92
8.1.230.0080.00319.05
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0090.00017.35
8.1.190.0040.00417.23
8.1.180.0070.00018.10
8.1.170.0030.00718.43
8.1.160.0070.00021.88
8.1.150.0040.00418.86
8.1.140.0070.00017.32
8.1.130.0030.00317.75
8.1.120.0000.00717.29
8.1.110.0040.00417.41
8.1.100.0040.00417.32
8.1.90.0030.00317.36
8.1.80.0000.00717.37
8.1.70.0040.00417.43
8.1.60.0040.00417.54
8.1.50.0000.00817.55
8.1.40.0030.00517.47
8.1.30.0080.00017.54
8.1.20.0000.00817.67
8.1.10.0050.00217.43
8.1.00.0000.00817.43
8.0.300.0080.00018.77
8.0.290.0070.00016.63
8.0.280.0040.00418.36
8.0.270.0000.00717.19
8.0.260.0060.00017.29
8.0.250.0030.00316.88
8.0.240.0070.00016.88
8.0.230.0030.00316.96
8.0.220.0030.00416.91
8.0.210.0070.00016.86
8.0.200.0040.00416.89
8.0.190.0040.00416.97
8.0.180.0000.00716.89
8.0.170.0090.00016.93
8.0.160.0050.00216.87
8.0.150.0000.00716.85
8.0.140.0040.00416.87
8.0.130.0000.00513.29
8.0.120.0080.00016.73
8.0.110.0030.00516.89
8.0.100.0040.00416.82
8.0.90.0070.00016.98
8.0.80.0040.01216.98
8.0.70.0000.00816.88
8.0.60.0080.00016.77
8.0.50.0050.00216.83
8.0.30.0090.01417.15
8.0.20.0100.00917.40
8.0.10.0040.00416.91
8.0.00.0090.00916.90
7.4.330.0030.00315.03
7.4.320.0060.00016.41
7.4.300.0060.00316.34
7.4.290.0020.00516.34
7.4.280.0040.00416.42
7.4.270.0040.00416.42
7.4.260.0030.00716.50
7.4.250.0040.00416.48
7.4.240.0050.00316.42
7.4.230.0070.00016.44
7.4.220.0110.00716.47
7.4.210.0110.00316.39
7.4.200.0030.00316.60
7.4.160.0100.00616.42
7.4.150.0090.00917.40
7.4.140.0090.01117.86
7.4.130.0080.01016.64
7.4.120.0070.01516.49
7.4.110.0100.00716.61
7.4.100.0140.00316.48
7.4.90.0100.00716.72
7.4.80.0090.00919.39
7.4.70.0140.00616.70
7.4.60.0080.01216.36
7.4.50.0000.00416.50
7.4.40.0130.01016.60
7.4.30.0060.01616.40
7.4.00.0060.01314.87
7.3.330.0030.00313.10
7.3.320.0110.00413.22
7.3.310.0000.00716.39
7.3.300.0030.00316.34
7.3.290.0070.00016.27
7.3.280.0090.00916.31
7.3.270.0100.00717.40
7.3.260.0090.00916.61
7.3.250.0120.00516.45
7.3.240.0030.01316.23
7.3.230.0150.00316.39
7.3.210.0100.01316.34
7.3.200.0070.01419.39
7.3.190.0120.00916.30
7.3.180.0050.01416.46
7.3.170.0100.01016.64
7.3.160.0080.01216.37
7.2.330.0080.01616.70
7.2.320.0060.01516.52
7.2.310.0110.00716.55
7.2.300.0100.00716.55
7.2.290.0110.00716.75
7.2.110.0190.01116.26
7.2.60.0040.01216.96
7.2.00.0040.00819.25
7.1.200.0070.00715.80
7.1.70.0000.00717.15
7.1.60.0030.00917.14
7.1.50.0130.00717.05
7.1.00.0030.07722.36
7.0.200.0070.00716.65
7.0.140.0030.05721.93
7.0.70.4130.04319.90
7.0.60.0130.07319.93
7.0.50.0130.08017.97
7.0.40.0100.05320.12
7.0.30.0130.07720.24
7.0.20.0230.05320.06
7.0.10.0170.06020.23
7.0.00.0170.08020.35
5.6.280.0030.07320.83
5.6.210.0070.07720.73
5.6.200.0100.08318.17
5.6.190.0000.07320.33
5.6.180.0200.06720.51
5.6.170.0330.07720.52
5.6.160.0070.05020.51
5.6.150.0100.08018.11
5.6.140.0130.07018.28
5.6.130.0030.07718.18
5.6.120.0130.08321.07
5.6.110.0130.07021.13
5.6.100.0070.07321.11
5.6.90.0070.03720.88
5.6.80.0030.04020.38
5.6.70.0270.06020.50
5.5.350.0170.07720.37
5.5.340.0030.05317.98
5.5.330.0000.07320.21
5.5.320.0070.04320.28
5.5.310.0270.08020.41
5.5.300.0130.06718.03
5.5.290.0070.07718.07
5.5.280.0130.06020.81
5.5.270.0070.08320.68
5.5.260.0100.07020.87
5.5.250.0030.08720.70
5.5.240.0030.07720.19
5.4.450.0330.07319.31
5.4.440.0330.07319.52
5.4.430.0230.05319.56
5.4.420.0330.07319.41
5.4.410.0330.06319.28
5.4.400.0370.04018.95
5.4.390.0330.04718.88
5.4.380.0230.03719.14
5.4.370.0400.05718.83
5.4.360.0370.04319.25
5.4.350.0370.06019.06
5.4.340.0370.07018.95
5.4.320.0300.04319.31
5.4.310.0230.04718.85
5.4.300.0330.06318.95
5.4.290.0270.04318.88
5.4.280.0300.07019.21
5.4.270.0330.04019.14
5.4.260.0270.04718.98
5.4.250.0200.05319.21
5.4.240.0330.06019.00
5.4.230.0270.06319.34
5.4.220.0370.06319.06
5.4.210.0230.04718.87
5.4.200.0300.07318.86
5.4.190.0400.06319.21
5.4.180.0330.06319.20
5.4.170.0300.06719.30
5.4.160.0230.05319.20
5.4.150.0270.07318.82
5.4.140.0330.04316.36
5.4.130.0230.05016.49
5.4.120.0270.03716.41
5.4.110.0300.07016.60
5.4.100.0370.05716.33
5.4.90.0300.06316.53
5.4.80.0300.06316.52
5.4.70.0270.03316.54
5.4.60.0370.06016.43
5.4.50.0370.06316.50
5.4.40.0270.04716.38
5.4.30.0330.07016.43
5.4.20.0400.04716.42
5.4.10.0400.05316.48
5.4.00.0300.05715.78
5.3.290.0230.05315.53
5.3.280.0230.06314.61
5.3.270.0200.04714.51
5.3.260.0300.04014.51
5.3.250.0300.06014.66
5.3.240.0430.06014.61
5.3.230.0300.07014.73
5.3.220.0300.03014.49
5.3.210.0270.06714.57
5.3.200.0300.04714.57
5.3.190.0300.07014.69
5.3.180.0370.05314.54
5.3.170.0230.04714.73
5.3.160.0300.07314.59
5.3.150.0330.07014.54
5.3.140.0270.05714.51
5.3.130.0330.07314.56
5.3.120.0300.06714.58
5.3.110.0370.06714.73
5.3.100.0370.06314.09
5.3.90.0300.05014.04
5.3.80.0300.06714.04
5.3.70.0330.07013.95
5.3.60.0330.05314.01
5.3.50.0200.04313.96
5.3.40.0330.03713.87
5.3.30.0300.04013.89
5.3.20.0370.06013.61
5.3.10.0330.06713.57
5.3.00.0370.06013.61
5.2.170.0200.04712.02
5.2.160.0270.04312.02
5.2.150.0270.03312.02
5.2.140.0300.03312.02
5.2.130.0270.05012.02
5.2.120.0270.05312.02
5.2.110.0270.05712.02
5.2.100.0230.04312.02
5.2.90.0230.03312.02
5.2.80.0300.06012.02
5.2.70.0270.05312.02
5.2.60.0330.04712.02
5.2.50.0270.05312.02
5.2.40.0200.04012.02
5.2.30.0200.04312.02
5.2.20.0270.05312.02
5.2.10.0170.05012.02
5.2.00.0200.05712.02
5.1.60.0200.04012.02
5.1.50.0170.03312.02
5.1.40.0170.05012.02
5.1.30.0230.05012.02
5.1.20.0230.05012.02
5.1.10.0170.03012.02
5.1.00.0200.03312.02
5.0.50.0070.02312.02
5.0.40.0100.03712.02
5.0.30.0130.03012.02
5.0.20.0170.03312.02
5.0.10.0130.04012.02
5.0.00.0170.05312.02
4.4.90.0130.03012.02
4.4.80.0170.01312.02
4.4.70.0130.02012.02
4.4.60.0070.02012.02
4.4.50.0070.03712.02
4.4.40.0130.03712.02
4.4.30.0030.02712.02
4.4.20.0070.02712.02
4.4.10.0070.01712.02
4.4.00.0130.02312.02
4.3.110.0130.03012.02
4.3.100.0130.03012.02
4.3.90.0130.02312.02
4.3.80.0130.04712.02
4.3.70.0100.03012.02
4.3.60.0130.03012.02
4.3.50.0100.02712.02
4.3.40.0130.03012.02
4.3.30.0070.03312.02
4.3.20.0070.02312.02
4.3.10.0030.03712.02
4.3.00.0030.02312.02

preferences:
31.24 ms | 401 KiB | 5 Q