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 round(1 / (1 + pow(10, ($this->rating2 - $this->rating1) / 400)) * 100); } } echo (new Ratings(2000, 2000))->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.60.0070.01016.75
8.3.50.0030.01018.08
8.3.40.0100.01318.79
8.3.30.0040.01119.26
8.3.20.0120.00020.34
8.3.10.0080.00021.79
8.3.00.0080.00019.27
8.2.180.0070.01418.29
8.2.170.0070.00722.96
8.2.160.0030.01020.46
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.78
8.2.110.0100.00020.96
8.2.100.0090.00317.75
8.2.90.0040.00419.39
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0000.00818.16
8.2.50.0030.00618.07
8.2.40.0030.00618.09
8.2.30.0070.00018.12
8.2.20.0040.00417.76
8.2.10.0050.00318.09
8.2.00.0000.00917.70
8.1.280.0110.00725.92
8.1.270.0030.00619.00
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0090.00022.19
8.1.230.0080.00320.89
8.1.220.0000.00917.74
8.1.210.0080.00018.77
8.1.200.0080.00017.47
8.1.190.0050.00317.36
8.1.180.0000.00818.10
8.1.170.0040.00420.44
8.1.160.0040.00422.09
8.1.150.0050.00318.83
8.1.140.0050.00217.46
8.1.130.0050.00317.89
8.1.120.0040.00417.49
8.1.110.0040.00417.36
8.1.100.0000.00717.53
8.1.90.0000.00717.42
8.1.80.0050.00217.53
8.1.70.0070.00017.41
8.1.60.0040.00417.58
8.1.50.0000.00817.55
8.1.40.0040.00417.60
8.1.30.0000.00817.71
8.1.20.0000.00817.63
8.1.10.0000.00717.48
8.1.00.0000.00817.46
8.0.300.0040.00418.77
8.0.290.0030.00516.88
8.0.280.0000.00718.41
8.0.270.0000.00717.25
8.0.260.0040.00417.24
8.0.250.0000.00716.99
8.0.240.0000.00617.06
8.0.230.0040.00416.93
8.0.220.0000.00716.92
8.0.210.0000.00716.79
8.0.200.0000.00616.82
8.0.190.0040.00417.00
8.0.180.0070.00016.92
8.0.170.0000.00716.80
8.0.160.0070.00016.86
8.0.150.0040.00416.92
8.0.140.0080.00016.75
8.0.130.0060.00013.30
8.0.120.0030.00516.92
8.0.110.0040.00416.88
8.0.100.0030.00616.82
8.0.90.0040.00416.84
8.0.80.0110.00716.95
8.0.70.0000.00717.00
8.0.60.0000.00716.97
8.0.50.0040.00416.78
8.0.30.0110.00716.96
8.0.20.0100.00917.46
8.0.10.0070.00016.89
8.0.00.0060.01216.88
7.4.330.0050.00015.07
7.4.320.0060.00016.40
7.4.300.0000.01016.61
7.4.290.0000.00716.58
7.4.280.0040.00416.45
7.4.270.0070.00016.57
7.4.260.0060.00316.48
7.4.250.0000.00716.61
7.4.240.0020.00516.53
7.4.230.0070.00016.54
7.4.220.0130.00616.51
7.4.210.0080.00616.65
7.4.200.0030.00316.59
7.4.160.0110.00516.30
7.4.150.0080.01117.40
7.4.140.0110.01017.86
7.4.130.0100.01016.45
7.4.120.0120.00716.65
7.4.110.0150.00716.53
7.4.100.0060.01116.49
7.4.90.0100.00716.50
7.4.80.0080.00819.39
7.4.70.0120.00616.51
7.4.60.0100.00716.72
7.4.50.0030.00316.66
7.4.40.0070.01016.54
7.4.30.0070.01116.60
7.4.00.0080.01014.63
7.3.330.0000.00613.39
7.3.320.0100.00313.38
7.3.310.0000.00716.22
7.3.300.0000.00616.25
7.3.290.0000.00716.38
7.3.280.0090.00816.32
7.3.270.0090.01217.40
7.3.260.0100.00716.56
7.3.250.0090.00716.49
7.3.240.0070.01016.30
7.3.230.0090.01216.39
7.3.210.0130.00316.21
7.3.200.0050.01019.39
7.3.190.0100.00716.45
7.3.180.0160.00616.33
7.3.170.0130.00316.70
7.3.160.0160.00716.50
7.3.120.0100.01015.10
7.3.110.0070.01114.59
7.3.100.0000.01115.04
7.3.90.0070.00714.71
7.3.80.0070.01114.92
7.3.70.0040.01114.93
7.3.60.0030.01014.91
7.3.50.0100.00614.85
7.3.40.0100.00614.55
7.3.30.0060.00814.85
7.3.20.0110.00316.48
7.3.10.0030.01416.50
7.3.00.0050.00516.68
7.2.330.0100.00716.74
7.2.320.0100.00716.47
7.2.310.0030.01416.77
7.2.300.0070.01016.73
7.2.290.0090.00916.69
7.2.250.0110.00815.08
7.2.240.0070.01415.23
7.2.230.0090.00914.85
7.2.220.0030.00915.25
7.2.210.0060.01315.16
7.2.200.0080.00414.65
7.2.190.0090.01215.00
7.2.180.0070.01115.23
7.2.170.0040.01114.80
7.2.60.0030.01017.09
7.2.00.0150.00619.18
7.1.330.0070.01015.79
7.1.320.0030.01215.53
7.1.310.0060.01016.00
7.1.300.0100.00715.55
7.1.290.0100.00715.97
7.1.280.0120.00415.78
7.1.270.0080.00315.79
7.1.260.0000.01215.95
7.1.200.0130.00015.78
7.1.100.0030.01418.04
7.1.70.0000.00717.00
7.1.60.0240.01417.18
7.1.50.0060.00916.63
7.1.00.0000.08022.34
7.0.200.0040.01116.63
7.0.140.0000.05722.00
7.0.60.0100.03321.75
7.0.50.0100.08317.95
7.0.40.0030.04320.24
7.0.30.0230.08320.06
7.0.20.0370.05320.30
7.0.10.0070.08720.12
7.0.00.0130.07320.23
5.6.280.0100.06720.82
5.6.210.0030.05320.48
5.6.200.0100.08018.17
5.6.190.0130.08020.55
5.6.180.3570.05020.34
5.6.170.0270.04320.47
5.6.160.0130.05020.50
5.6.150.0070.05018.16
5.6.140.0130.08018.22
5.6.130.0070.08318.21
5.6.120.0100.03320.98
5.6.110.0070.07321.02
5.6.100.0100.07321.14
5.6.90.0070.06721.00
5.6.80.0030.06720.42
5.5.350.0030.08020.47
5.5.340.0000.04317.97
5.5.330.0130.07320.37
5.5.320.0270.07020.34
5.5.310.0200.03320.26
5.5.300.0130.07317.97
5.5.290.0070.08017.96
5.5.280.0000.07020.89
5.5.270.0100.06720.77
5.5.260.0030.04320.76
5.5.250.0170.06320.77
5.5.240.0170.08020.14
5.4.450.0170.06019.57
5.4.440.0670.06719.68
5.4.430.0600.06719.63
5.4.420.0170.04719.48
5.4.410.0100.05319.51
5.4.400.0200.04718.81
5.4.390.0170.05018.77
5.4.380.0270.04018.73
5.4.370.0200.04718.51
5.4.360.0100.05718.48
5.4.350.0030.06318.54
5.4.340.0170.05018.79
5.4.320.0200.04718.78
5.4.310.0200.04318.59
5.4.300.0230.04718.63
5.4.290.0170.05018.52
5.4.280.0230.04318.83
5.4.270.0200.04718.72
5.4.260.0130.05318.84
5.4.250.0300.03718.53
5.4.240.0170.05318.80
5.4.230.0130.05318.69
5.4.220.0170.05318.75
5.4.210.0170.05018.86
5.4.200.0230.04716.65
5.4.190.0070.06718.79
5.4.180.0200.05718.76
5.4.170.0270.06718.61
5.4.160.0200.04718.78
5.4.150.0130.06018.73
5.4.140.0100.07316.27
5.4.130.0170.05316.21
5.4.120.0100.05716.30
5.4.110.0170.04716.45
5.4.100.0030.06016.35
5.4.90.0230.04316.44
5.4.80.0170.04316.28
5.4.70.0130.05316.30
5.4.60.0200.04316.29
5.4.50.0130.05016.30
5.4.40.0200.04716.39
5.4.30.0170.04716.25
5.4.20.0070.06016.26
5.4.10.0130.05016.26
5.4.00.0070.05715.77
5.3.290.0030.06314.81
5.3.280.0170.05014.65
5.3.270.0130.05714.74
5.3.260.0200.05014.83
5.3.250.0270.04314.74
5.3.240.0300.04314.80
5.3.230.0130.05314.64
5.3.220.0200.04314.71
5.3.210.0170.05314.61
5.3.200.0130.05014.78
5.3.190.0130.05014.61
5.3.180.0170.05014.62
5.3.170.0170.04714.72
5.3.160.0170.04714.59
5.3.150.0100.06014.60
5.3.140.0170.06014.62
5.3.130.0030.06314.78
5.3.120.0070.06314.59
5.3.110.0070.06314.58
5.3.100.0170.05014.14
5.3.90.0200.04314.05
5.3.80.0130.04714.08
5.3.70.0130.05014.07
5.3.60.0170.04714.06
5.3.50.0100.05314.06
5.3.40.0170.05014.05
5.3.30.0130.05013.89
5.3.20.0100.05713.91
5.3.10.0170.04713.71
5.3.00.0130.05013.86
5.2.170.0070.04711.17
5.2.160.0130.04011.25
5.2.150.0030.05011.15
5.2.140.0130.04311.24
5.2.130.0230.03311.15
5.2.120.0070.04311.16
5.2.110.0000.05011.20
5.2.100.0030.04711.24
5.2.90.0130.03711.13
5.2.80.0230.03011.21
5.2.70.0070.04711.20
5.2.60.0030.04711.10
5.2.50.0030.04711.13
5.2.40.0130.04011.05
5.2.30.0070.04310.92
5.2.20.0100.04011.00
5.2.10.0100.03710.91
5.2.00.0070.04310.90
5.1.60.0030.03710.20
5.1.50.0100.03310.13
5.1.40.0100.03010.02
5.1.30.0100.03310.41
5.1.20.0100.04010.50
5.1.10.0130.03010.26
5.1.00.0100.03310.11
5.0.50.0100.0278.57
5.0.40.0070.0278.50
5.0.30.0000.0478.36
5.0.20.0130.0178.39
5.0.10.0030.0308.18
5.0.00.0100.0438.31
4.4.90.0000.0275.93
4.4.80.0070.0205.91
4.4.70.0030.0235.96
4.4.60.0070.0205.90
4.4.50.0070.0175.91
4.4.40.0030.0335.91
4.4.30.0000.0305.98
4.4.20.0000.0276.04
4.4.10.0070.0205.96
4.4.00.0000.0375.96
4.3.110.0030.0235.86
4.3.100.0070.0205.81
4.3.90.0000.0235.91
4.3.80.0000.0375.86
4.3.70.0070.0275.77
4.3.60.0030.0235.77
4.3.50.0070.0205.82
4.3.40.0070.0335.79
4.3.30.0030.0234.58
4.3.20.0030.0234.52
4.3.10.0000.0234.56
4.3.00.0070.0236.96

preferences:
65.92 ms | 400 KiB | 5 Q