3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { public static $currentValue; public static function toValue($value) { self::$currentValue = $value; return new self; } public static function add($value) { self::$currentValue = self::$currentValue + $value; return new self; } public static function subtract($value) { self::$currentValue = self::$currentValue - $value; return new self; } public static function result() { return self::$value; } } $value = TestClass::toValue(5)->add(3)->subtract(2)->add(8)->result();

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.0110.01116.63
8.3.50.0090.00922.16
8.3.40.0070.01118.83
8.3.30.0070.00719.05
8.3.20.0040.00420.05
8.3.10.0080.00023.57
8.3.00.0110.00020.55
8.2.180.0070.01016.85
8.2.170.0030.01322.96
8.2.160.0070.00720.38
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00022.08
8.2.110.0110.00720.98
8.2.100.0040.00718.34
8.2.90.0040.00419.04
8.2.80.0080.00017.97
8.2.70.0030.00617.50
8.2.60.0040.00418.05
8.2.50.0040.00418.10
8.2.40.0040.00420.61
8.2.30.0000.00821.02
8.2.20.0000.00717.61
8.2.10.0000.00817.58
8.2.00.0030.00617.67
8.1.280.0100.01025.92
8.1.270.0040.00422.13
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.64
8.1.230.0000.01220.30
8.1.220.0030.00617.74
8.1.210.0080.00018.77
8.1.200.0030.00617.38
8.1.190.0000.01217.12
8.1.180.0040.00418.10
8.1.170.0080.00018.53
8.1.160.0040.00418.83
8.1.150.0000.00720.05
8.1.140.0070.00017.30
8.1.130.0030.00317.75
8.1.120.0030.00317.44
8.1.110.0080.00017.31
8.1.100.0070.00017.41
8.1.90.0040.00417.42
8.1.80.0000.00717.30
8.1.70.0030.00317.37
8.1.60.0060.00317.52
8.1.50.0040.00417.51
8.1.40.0030.00617.57
8.1.30.0000.00717.58
8.1.20.0040.00417.63
8.1.10.0020.00517.52
8.1.00.0070.00017.52
8.0.300.0000.00818.77
8.0.290.0030.00616.63
8.0.280.0030.00318.32
8.0.270.0040.00417.26
8.0.260.0030.00316.86
8.0.250.0080.00016.96
8.0.240.0030.00316.89
8.0.230.0030.00316.86
8.0.220.0050.00216.89
8.0.210.0050.00316.87
8.0.200.0060.00016.86
8.0.190.0030.00416.98
8.0.180.0040.00416.95
8.0.170.0000.00716.87
8.0.160.0000.00916.91
8.0.150.0000.00716.71
8.0.140.0030.00316.79
8.0.130.0000.00513.28
8.0.120.0040.00416.96
8.0.110.0050.00316.93
8.0.100.0000.00716.77
8.0.90.0020.00516.71
8.0.80.0030.01716.86
8.0.70.0040.00416.80
8.0.60.0030.00516.85
8.0.50.0070.00016.78
8.0.30.0100.00717.14
8.0.20.0100.00917.40
8.0.10.0000.00716.96
8.0.00.0150.01016.61
7.4.330.0000.00615.13
7.4.320.0060.00016.57
7.4.300.0000.00616.49
7.4.290.0020.00516.50
7.4.280.0070.00016.50
7.4.270.0060.00316.54
7.4.260.0000.00716.59
7.4.250.0000.00716.59
7.4.240.0050.00316.42
7.4.230.0000.00716.71
7.4.220.0100.00716.58
7.4.210.0080.00616.58
7.4.200.0000.00716.36
7.4.190.0030.00316.51
7.4.160.0030.01216.36
7.4.150.0000.01917.40
7.4.140.0080.01017.86
7.4.130.0110.00616.54
7.4.120.0070.01116.58
7.4.110.0100.00716.54
7.4.100.0120.00616.50
7.4.90.0070.01016.46
7.4.80.0100.00616.57
7.4.70.0030.01816.57
7.4.60.0100.00616.45
7.4.50.0040.00416.50
7.4.40.0110.00622.77
7.4.30.0070.01016.67
7.4.00.0030.01214.76
7.3.330.0000.00613.40
7.3.320.0000.00513.44
7.3.310.0000.00716.34
7.3.300.0040.00416.49
7.3.290.0090.01216.45
7.3.280.0080.01116.44
7.3.270.0040.01217.40
7.3.260.0040.01316.63
7.3.250.0140.00816.54
7.3.240.0110.00716.41
7.3.230.0130.00916.69
7.3.210.0060.01416.52
7.3.200.0080.01519.39
7.3.190.0070.01016.43
7.3.180.0120.00316.61
7.3.170.0070.01316.64
7.3.160.0100.01016.47
7.3.120.0030.00714.86
7.2.330.0090.00916.66
7.2.320.0060.01616.64
7.2.310.0130.01016.42
7.2.300.0040.01216.70
7.2.290.0080.00816.66
7.2.60.0160.00616.65
7.2.50.0030.01316.98
7.1.200.0150.00015.50
7.1.70.0000.00817.14
7.1.60.0150.00619.29
7.1.50.0150.00916.89
7.1.00.0000.07722.36
7.0.200.0000.00816.94
7.0.140.0000.07722.09
7.0.60.0270.06320.04
7.0.50.0100.08317.83
7.0.40.0030.04320.19
7.0.30.0270.07720.25
7.0.20.0330.04320.20
7.0.10.0000.07020.20
7.0.00.0030.05020.23
5.6.210.0030.04020.75
5.6.200.0100.07718.22
5.6.190.0130.08020.61
5.6.180.0300.05320.77
5.6.170.0270.05020.71
5.6.160.0130.05320.55
5.6.150.0030.08018.29
5.6.140.0100.06018.21
5.6.130.0030.07018.15
5.6.120.0030.09021.06
5.6.110.0000.04321.01
5.6.100.0130.08020.98
5.6.90.0130.07320.95
5.6.80.0130.08020.41
5.5.350.0130.09020.31
5.5.340.0070.08017.93
5.5.330.0070.04720.27
5.5.320.0170.06320.36
5.5.310.0200.03720.50
5.5.300.0100.07318.01
5.5.290.0130.07018.07
5.5.280.0030.04020.88
5.5.270.0000.09020.96
5.5.260.0130.05020.73
5.5.250.0030.05320.47
5.5.240.0170.07320.25
5.4.450.4000.04019.54
5.4.440.0100.07719.54
5.4.430.1330.06319.54
5.4.420.3830.03719.27
5.4.410.4030.03319.39
5.4.400.3070.03719.16
5.4.390.3000.03319.21
5.4.380.3700.03718.97
5.4.370.2630.04019.13
5.4.360.3370.03318.98
5.4.350.1830.03319.17
5.4.340.2000.04319.22
5.4.320.3800.04319.22
5.4.310.4070.04019.18
5.4.300.3870.03719.23
5.4.290.5730.03019.21
5.4.280.4530.04019.06
5.4.270.3730.03719.01
5.4.260.3630.03719.22
5.4.250.3900.03719.12
5.4.240.3770.03319.21
5.4.230.3330.03319.16
5.4.220.3370.03319.22
5.4.210.3730.04019.20
5.4.200.4530.03719.03
5.4.190.4600.04019.03
5.4.180.4770.03719.18
5.4.170.4400.03718.93
5.4.160.4370.03719.09
5.4.150.3830.04719.20
5.4.140.3700.04016.39
5.4.130.4030.04016.25
5.4.120.4030.03316.41
5.4.110.4030.03316.52
5.4.100.3670.03316.56
5.4.90.4000.03716.53
5.4.80.4530.03316.67
5.4.70.3730.02016.44
5.4.60.3970.03316.54
5.4.50.4270.04316.48
5.4.40.3800.03016.49
5.4.30.4170.03316.60
5.4.20.0100.03316.42
5.4.10.0000.05316.45
5.4.00.4000.03015.93
5.3.290.3670.03714.70
5.3.280.3930.04014.61
5.3.270.4470.04014.68
5.3.260.3530.03714.62
5.3.250.3770.04014.50
5.3.240.4300.04014.66
5.3.230.3630.04014.63
5.3.220.4100.03014.63
5.3.210.3730.04014.63
5.3.200.3570.03714.64
5.3.190.4500.04014.50
5.3.180.3900.03714.58
5.3.170.4330.03714.46
5.3.160.3430.04314.64
5.3.150.3600.03314.46
5.3.140.3970.03714.61
5.3.130.4130.03714.61
5.3.120.2100.04014.56
5.3.110.0070.03714.61
5.3.100.3370.03714.07
5.3.90.4070.03014.19
5.3.80.4500.03714.03
5.3.70.4370.03714.09
5.3.60.4530.03714.03
5.3.50.3930.03013.95
5.3.40.4400.03714.01
5.3.30.4770.03313.97
5.3.20.4730.03313.70
5.3.10.4370.04013.56
5.3.00.3000.03713.81
5.2.170.3730.03311.05
5.2.160.3700.03011.16
5.2.150.4070.02311.12
5.2.140.3800.03311.10
5.2.130.3230.03311.06
5.2.120.3670.03011.11
5.2.110.3530.03011.11
5.2.100.0070.06711.11
5.2.90.0170.05011.11
5.2.80.0000.06011.13
5.2.70.0030.06711.10
5.2.60.3170.03311.06
5.2.50.3470.02710.99
5.2.40.2900.03011.15
5.2.30.2500.02711.01
5.2.20.2730.03010.93
5.2.10.2800.03010.88
5.2.00.3030.03310.72
5.1.60.3330.0279.98
5.1.50.3370.0209.96
5.1.40.2400.0279.93
5.1.30.2570.02710.32
5.1.20.1200.02710.52
5.1.10.1270.03010.23
5.1.00.2130.02310.23
5.0.50.1070.0278.62
5.0.40.1030.0178.44
5.0.30.1030.0308.14
5.0.20.1130.0138.17
5.0.10.0730.0208.25
5.0.00.0670.0308.14
4.4.90.0030.0336.10
4.4.80.1470.0176.10
4.4.70.1330.0176.10
4.4.60.1530.0206.10
4.4.50.1470.0136.10
4.4.40.1770.0276.10
4.4.30.1470.0176.10
4.4.20.0900.0136.11
4.4.10.0370.0176.11
4.4.00.1130.0236.11
4.3.110.0730.0176.11
4.3.100.1030.0136.11
4.3.90.0570.0176.11
4.3.80.1100.0236.11
4.3.70.0430.0136.11
4.3.60.0530.0136.11
4.3.50.0800.0106.11
4.3.40.0730.0276.11
4.3.30.0770.0136.11
4.3.20.0330.0136.11
4.3.10.0100.0136.11
4.3.00.0230.0176.11

preferences:
52.59 ms | 401 KiB | 5 Q