3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Controller{ public $rating1; public $rating2; } class Ratings { 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(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.60.0070.00717.13
8.3.50.0110.00922.22
8.3.40.0040.01119.21
8.3.30.0120.00319.18
8.3.20.0050.00220.33
8.3.10.0070.00021.75
8.3.00.0030.00619.38
8.2.180.0100.01018.79
8.2.170.0070.00722.96
8.2.160.0030.01020.78
8.2.150.0000.00924.18
8.2.140.0000.00824.66
8.2.130.0070.00326.16
8.2.120.0110.00419.91
8.2.110.0040.00721.31
8.2.100.0000.01218.09
8.2.90.0030.00519.36
8.2.80.0050.00317.97
8.2.70.0060.00317.75
8.2.60.0040.00418.30
8.2.50.0030.00618.10
8.2.40.0060.00320.26
8.2.30.0030.00518.23
8.2.20.0040.00417.93
8.2.10.0040.00418.30
8.2.00.0060.00317.99
8.1.280.0180.00325.92
8.1.270.0000.00918.95
8.1.260.0060.00326.35
8.1.250.0030.00528.09
8.1.240.0060.00321.21
8.1.230.0100.00317.89
8.1.220.0030.00618.00
8.1.210.0030.00518.77
8.1.200.0030.00717.48
8.1.190.0040.00417.48
8.1.180.0000.00818.10
8.1.170.0000.00920.68
8.1.160.0000.00722.24
8.1.150.0000.00819.06
8.1.140.0040.00417.50
8.1.130.0030.00318.04
8.1.120.0000.00717.65
8.1.110.0070.00017.50
8.1.100.0000.00717.72
8.1.90.0000.00717.71
8.1.80.0070.00017.76
8.1.70.0000.00717.75
8.1.60.0000.00817.85
8.1.50.0040.00417.80
8.1.40.0050.00317.84
8.1.30.0030.00517.80
8.1.20.0050.00317.79
8.1.10.0030.00517.75
8.1.00.0000.00717.75
8.0.300.0030.00618.77
8.0.290.0040.00416.88
8.0.280.0000.00718.63
8.0.270.0000.00717.59
8.0.260.0060.00017.52
8.0.250.0030.00317.25
8.0.240.0000.00717.24
8.0.230.0070.00017.04
8.0.220.0070.00017.08
8.0.210.0040.00417.06
8.0.200.0060.00016.99
8.0.190.0080.00017.02
8.0.180.0070.00017.13
8.0.170.0050.00317.14
8.0.160.0000.00717.00
8.0.150.0000.00717.08
8.0.140.0030.00517.12
8.0.130.0050.00013.45
8.0.120.0040.00417.03
8.0.110.0040.00417.23
8.0.100.0040.00417.10
8.0.90.0000.00817.19
8.0.80.0150.00817.13
8.0.70.0050.00316.99
8.0.60.0000.00717.00
8.0.50.0060.00317.07
8.0.30.0100.01017.36
8.0.20.0110.00917.40
8.0.10.0040.00417.27
8.0.00.0080.00916.83
7.4.330.0000.00615.12
7.4.320.0030.00316.53
7.4.300.0030.00616.80
7.4.290.0030.00316.82
7.4.280.0070.00016.79
7.4.270.0040.00416.67
7.4.260.0060.00616.65
7.4.250.0040.00416.67
7.4.240.0020.00616.73
7.4.230.0070.00016.88
7.4.220.0070.01116.77
7.4.210.0030.01316.76
7.4.200.0040.00416.83
7.4.160.0080.00816.68
7.4.150.0030.01917.40
7.4.140.0080.01317.86
7.4.130.0090.00816.75
7.4.120.0070.01016.78
7.4.110.0110.00916.56
7.4.100.0070.01016.67
7.4.90.0130.00316.84
7.4.80.0060.01019.39
7.4.70.0060.00916.52
7.4.60.0070.01016.45
7.4.50.0060.00016.62
7.4.40.0090.01216.82
7.4.30.0110.00616.89
7.4.00.0060.01015.16
7.3.330.0000.00613.42
7.3.320.0130.00013.54
7.3.310.0000.00716.34
7.3.300.0000.00716.50
7.3.290.0050.00216.50
7.3.280.0080.00816.49
7.3.270.0140.00717.40
7.3.260.0040.01216.68
7.3.250.0160.00716.54
7.3.240.0170.00016.69
7.3.230.0190.00316.55
7.3.210.0100.01416.64
7.3.200.0110.00619.39
7.3.190.0100.00716.52
7.3.180.0190.00416.73
7.3.170.0070.01416.71
7.3.160.0060.01616.51
7.3.120.0080.00415.00
7.3.110.0040.01415.08
7.3.100.0000.01214.67
7.3.90.0070.00314.76
7.3.80.0110.00414.95
7.3.70.0080.00314.86
7.3.60.0120.00014.93
7.3.50.0030.01315.15
7.3.40.0060.00614.97
7.3.30.0030.01014.81
7.3.20.0040.01216.81
7.3.10.0080.00516.92
7.3.00.0040.00916.75
7.2.330.0070.01116.90
7.2.320.0140.00517.12
7.2.310.0090.00916.95
7.2.300.0030.01316.62
7.2.290.0090.00916.87
7.2.250.0100.01015.49
7.2.240.0100.01015.52
7.2.230.0060.00915.18
7.2.220.0040.01115.05
7.2.210.0170.00015.16
7.2.200.0100.00615.38
7.2.190.0030.00714.89
7.2.180.0070.01015.13
7.2.170.0000.01015.34
7.2.160.0100.00315.21
7.2.150.0100.00617.23
7.2.140.0030.01217.26
7.2.130.0040.00917.22
7.2.120.0020.01116.90
7.2.110.0070.00817.21
7.2.100.0080.00616.98
7.2.90.0070.00817.10
7.2.80.0100.00817.10
7.2.70.0100.00717.11
7.2.60.0050.00817.04
7.2.50.0040.01117.30
7.2.40.0110.00317.04
7.2.30.0120.00417.05
7.2.20.0060.00617.07
7.2.10.0090.00617.17
7.2.00.0070.00717.84
7.1.330.0030.01015.99
7.1.320.0070.00715.86
7.1.310.0000.00916.12
7.1.300.0030.00715.70
7.1.290.0090.00916.08
7.1.280.0130.00015.94
7.1.270.0000.01215.85
7.1.260.0090.00615.97
7.1.250.0060.00615.90
7.1.100.0030.00618.26
7.1.70.0000.00717.48
7.1.60.0030.00917.52
7.1.50.0130.00017.15
7.1.00.0030.07722.67
7.0.200.0070.01016.97
7.0.140.0030.05322.23
7.0.120.0030.09022.23
7.0.110.0030.06322.20
7.0.100.0030.08722.15
7.0.90.0030.04722.35
7.0.80.0030.06722.31
7.0.70.0200.06722.13
7.0.60.0170.07022.17
7.0.50.0100.05022.14
7.0.40.0070.04320.24
7.0.30.0030.07320.28
7.0.20.0070.04320.28
7.0.10.0000.04320.34
7.0.00.0030.04020.31
5.6.280.0100.06721.26
5.6.270.0130.06721.01
5.6.260.0100.03721.26
5.6.250.0100.09020.89
5.6.240.0070.05721.18
5.6.230.0130.05021.18
5.6.220.0130.04720.97
5.6.210.0130.06320.86
5.6.200.0000.04721.18
5.6.190.0100.07320.96
5.6.180.0100.03021.10
5.6.170.0070.08021.10
5.6.160.0000.07720.85
5.6.150.0070.06021.24
5.6.140.0070.04720.95
5.6.130.0030.07320.96
5.6.120.0030.04721.19
5.6.110.0200.06321.13
5.6.100.0000.06321.15
5.6.90.0070.05020.94
5.6.80.0100.05020.63
5.6.70.0070.04320.55
5.6.60.0070.08020.30
5.6.50.0070.07020.57
5.6.40.0100.06320.31
5.6.30.0030.08720.46
5.6.20.0030.08020.52
5.6.10.0000.05720.53
5.6.00.0000.04320.58
5.5.380.0270.06017.73
5.5.370.0230.03017.71
5.5.360.0000.07317.81
5.5.350.0070.08017.69
5.5.340.0070.04018.11
5.5.330.0070.06318.27
5.5.320.0130.07718.02
5.5.310.0030.07318.23
5.5.300.0100.05718.02
5.5.290.0070.07018.26
5.5.280.0030.05018.36
5.5.270.0100.04318.13
5.5.260.0030.08318.30
5.5.250.0030.04018.05
5.5.240.0100.04717.42
5.5.230.0070.06717.64
5.5.220.0070.07317.49
5.5.210.0100.06317.41
5.5.200.0030.03317.70
5.5.190.0030.08017.57
5.5.180.0030.07317.61
5.5.160.0000.04317.37
5.5.150.0070.07017.60
5.5.140.0070.03317.46
5.5.130.0070.07317.45
5.5.120.0030.03717.45
5.5.110.0000.06017.69
5.5.100.0070.05017.61
5.5.90.0070.06017.48
5.5.80.0070.05717.63
5.5.70.0070.04017.26
5.5.60.0000.05717.50
5.5.50.0030.06017.28
5.5.40.0070.07317.62
5.5.30.0030.07717.34
5.5.20.0030.07717.50
5.5.10.0070.03017.59
5.5.00.0000.08017.38
5.4.450.0130.07719.42
5.4.440.0100.07319.64
5.4.430.0100.07719.40
5.4.420.0100.04719.54
5.4.410.0030.04319.60
5.4.400.0070.04319.34
5.4.390.0070.07719.08
5.4.380.0100.05719.15
5.4.370.0000.06319.22
5.4.360.0070.07719.13
5.4.350.0070.08319.30
5.4.340.0070.07319.30
5.4.320.0100.05019.47
5.4.310.0070.07019.25
5.4.300.0100.04719.17
5.4.290.0070.04719.30
5.4.280.0030.05019.22
5.4.270.0130.07019.23
5.4.260.0100.06319.30
5.4.250.0000.07019.18
5.4.240.0030.04719.16
5.4.230.0070.03019.08
5.4.220.0000.08719.14
5.4.210.0130.05319.16
5.4.200.0030.07719.09
5.4.190.0070.07319.29
5.4.180.0030.05319.07
5.4.170.0070.08019.08
5.4.160.0100.05719.31
5.4.150.0000.04319.07
5.4.140.0070.05716.74
5.4.130.0030.03716.61
5.4.120.0070.04016.63
5.4.110.0070.07316.55
5.4.100.0100.06716.66
5.4.90.0100.06716.60
5.4.80.0130.06316.70
5.4.70.0070.04316.68
5.4.60.0070.03716.64
5.4.50.0030.06716.72
5.4.40.0030.06716.54
5.4.30.0070.06716.72
5.4.20.0070.07016.65
5.4.10.0070.06016.47
5.4.00.0070.07016.09
5.3.290.0070.07314.53
5.3.280.0030.07714.63
5.3.270.0130.06314.84
5.3.260.0000.05014.74
5.3.250.0000.05014.75
5.3.240.0070.03314.61
5.3.230.0100.06714.74
5.3.220.0070.07314.72
5.3.210.0130.04714.53
5.3.200.0100.07314.57
5.3.190.0030.07714.43
5.3.180.0030.04314.59
5.3.170.0070.07014.80
5.3.160.0030.04714.66
5.3.150.0000.07314.60
5.3.140.0000.04314.79
5.3.130.0100.04014.58
5.3.120.0030.07714.55
5.3.110.0100.07714.57
5.3.100.0100.06714.06
5.3.90.0070.07014.03
5.3.80.0130.03713.98
5.3.70.0000.04714.03
5.3.60.0070.06014.05
5.3.50.0070.03713.98
5.3.40.0070.06314.09
5.3.30.0100.06713.77
5.3.20.0070.06013.78
5.3.10.0030.06013.68
5.3.00.0030.07013.79
5.2.170.0000.04311.11
5.2.160.0100.05711.14
5.2.150.0100.05311.29
5.2.140.0000.03711.23
5.2.130.0130.02711.25
5.2.120.0070.05311.11
5.2.110.0000.04011.34
5.2.100.0030.06011.24
5.2.90.0000.03011.07
5.2.80.0030.03311.07
5.2.70.0000.04711.24
5.2.60.0070.06311.03
5.2.50.0000.07010.91
5.2.40.0030.03311.01
5.2.30.0170.04310.99
5.2.20.0100.05711.20
5.2.10.0130.03010.95
5.2.00.0070.04710.71
5.1.60.0030.02710.16
5.1.50.0030.05010.18
5.1.40.0100.0409.95
5.1.30.0030.03710.35
5.1.20.0030.02310.35
5.1.10.0000.06010.05
5.1.00.0030.05010.07
5.0.50.0000.0209.06
5.0.40.0030.0409.06
5.0.30.0000.0679.06
5.0.20.0000.0239.06
5.0.10.0000.0239.06
5.0.00.0000.0409.06
4.4.90.0000.0209.06
4.4.80.0000.0379.06
4.4.70.0030.0339.06
4.4.60.0000.0179.06
4.4.50.0030.0279.06
4.4.40.0030.0509.06
4.4.30.0030.0339.06
4.4.20.0000.0379.06
4.4.10.0000.0339.06
4.4.00.0030.0439.06
4.3.110.0030.0309.06
4.3.100.0000.0379.06
4.3.90.0030.0179.06
4.3.80.0000.0409.06
4.3.70.0000.0179.06
4.3.60.0070.0139.06
4.3.50.0030.0179.06
4.3.40.0000.0279.06
4.3.30.0000.0179.06
4.3.20.0000.0179.06
4.3.10.0000.0179.06
4.3.00.0000.0179.06

preferences:
48.32 ms | 401 KiB | 5 Q