3v4l.org

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

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.0160.00318.56
8.3.50.0070.01318.42
8.3.40.0140.00018.84
8.3.30.0070.00718.70
8.3.20.0000.00818.73
8.3.10.0040.00423.66
8.3.00.0080.00020.56
8.2.180.0110.00425.92
8.2.170.0170.00318.83
8.2.160.0100.00622.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0110.00719.82
8.2.120.0060.00326.35
8.2.110.0130.00919.39
8.2.100.0040.00717.78
8.2.90.0040.00818.03
8.2.80.0050.00319.16
8.2.70.0080.00017.93
8.2.60.0040.00418.16
8.2.50.0040.00418.10
8.2.40.0030.00619.22
8.2.30.0030.00619.20
8.2.20.0000.00717.92
8.2.10.0040.00417.89
8.2.00.0000.00917.65
8.1.280.0120.00625.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0100.00722.15
8.1.230.0150.00020.66
8.1.220.0000.01017.74
8.1.210.0050.00318.77
8.1.200.0100.00017.35
8.1.190.0030.00617.23
8.1.180.0030.00618.10
8.1.170.0040.00418.61
8.1.160.0000.00718.76
8.1.150.0040.00418.76
8.1.140.0000.00722.05
8.1.130.0040.00417.50
8.1.120.0000.00917.39
8.1.110.0030.00617.39
8.1.100.0000.00717.39
8.1.90.0040.00417.41
8.1.80.0000.00817.39
8.1.70.0070.00317.39
8.1.60.0000.00917.61
8.1.50.0000.00817.52
8.1.40.0030.00617.51
8.1.30.0000.00817.50
8.1.20.0000.00717.61
8.1.10.0040.00417.59
8.1.00.0080.00017.52
8.0.300.0040.00419.80
8.0.290.0000.01216.58
8.0.280.0050.00318.49
8.0.270.0040.00417.23
8.0.260.0030.00316.65
8.0.250.0030.00316.92
8.0.240.0070.00016.81
8.0.230.0080.00016.91
8.0.220.0000.00716.83
8.0.210.0040.00416.81
8.0.200.0000.00716.91
8.0.190.0000.01016.90
8.0.180.0000.00916.93
8.0.170.0000.00916.83
8.0.160.0080.00016.86
8.0.150.0040.00416.78
8.0.140.0030.00516.85
8.0.130.0060.00013.21
8.0.120.0030.00516.82
8.0.110.0040.00416.79
8.0.100.0060.00316.91
8.0.90.0000.00716.70
8.0.80.0080.01016.85
8.0.70.0000.00816.79
8.0.60.0000.00816.88
8.0.50.0070.00016.75
8.0.30.0090.01217.01
8.0.20.0110.00917.40
8.0.10.0080.00016.81
8.0.00.0110.00816.87
7.4.330.0020.00215.55
7.4.320.0030.00316.52
7.4.300.0000.00616.53
7.4.290.0000.00716.61
7.4.280.0000.00716.59
7.4.270.0000.00716.49
7.4.260.0000.00816.52
7.4.250.0000.00716.41
7.4.240.0070.00016.54
7.4.230.0030.00316.45
7.4.220.0050.00216.60
7.4.210.0120.00516.60
7.4.200.0030.00516.32
7.4.160.0070.00916.57
7.4.140.0100.00717.86
7.4.130.0130.00616.67
7.4.120.0100.01016.51
7.4.110.0060.01216.65
7.4.100.0110.00716.48
7.4.90.0120.00616.43
7.4.80.0070.01019.39
7.4.70.0210.00516.60
7.4.60.0200.00816.52
7.4.50.0160.00916.51
7.4.40.0250.00516.56
7.4.30.0260.00716.34
7.4.20.0290.00316.34
7.4.10.0310.00316.55
7.4.00.0100.00915.74
7.3.330.0000.00513.37
7.3.320.0050.00013.35
7.3.310.0050.00316.29
7.3.300.0060.00016.29
7.3.290.0000.00716.41
7.3.280.0150.00416.34
7.3.260.0130.00816.57
7.3.240.0130.00816.49
7.3.230.0120.00616.55
7.3.210.0210.00016.53
7.3.200.0060.00916.34
7.3.190.0150.01416.54
7.3.180.0200.00816.52
7.3.170.0140.01516.46
7.3.160.0160.00916.54
7.3.150.0260.00916.16
7.3.140.0280.00616.37
7.3.130.0280.00816.32
7.3.120.0200.01216.39
7.3.110.0230.01616.20
7.3.100.0340.00816.41
7.3.90.0170.01515.54
7.3.80.0230.00815.72
7.3.70.0180.01015.65
7.3.60.0170.01315.39
7.3.50.0210.00815.40
7.3.40.0190.01015.56
7.3.30.0180.01215.55
7.3.20.0160.01215.66
7.3.10.0170.01215.64
7.3.00.0200.01215.80
7.2.330.0160.00616.80
7.2.320.0060.01216.46
7.2.310.0170.01216.60
7.2.300.0170.00816.54
7.2.290.0150.01016.72
7.2.280.0250.01016.77
7.2.270.0280.00716.75
7.2.260.0180.01816.71
7.2.250.0280.01216.35
7.2.240.0320.00916.51
7.2.230.0320.00816.79
7.2.220.0210.01215.86
7.2.210.0210.01115.88
7.2.200.0220.01015.63
7.2.190.0180.01415.83
7.2.180.0220.01015.79
7.2.170.0200.01315.84
7.2.160.0240.00615.76
7.2.150.0160.01515.81
7.2.140.0200.01015.83
7.2.130.0220.01115.70
7.2.120.0190.00815.85
7.2.110.0580.01115.43
7.2.100.0760.00815.37
7.2.90.0660.00815.51
7.2.80.0570.01115.43
7.2.70.0500.01515.39
7.2.60.0640.00715.42
7.2.50.0530.01315.56
7.2.40.0510.00915.53
7.2.30.0620.01015.43
7.2.20.0520.00615.39
7.2.10.0580.00715.49
7.2.00.0540.00915.61
7.1.330.0230.01415.43
7.1.320.0300.01214.85
7.1.310.0160.01314.74
7.1.300.0190.00814.72
7.1.290.0170.01214.49
7.1.280.0240.00614.80
7.1.270.0190.00914.64
7.1.260.0170.01014.62
7.1.250.0160.01214.67
7.1.240.0160.01314.63
7.1.230.0650.01014.38
7.1.220.0610.01414.45
7.1.210.0580.01114.43
7.1.200.0560.00814.35
7.1.190.0530.00814.34
7.1.180.0510.01114.08
7.1.170.0620.00814.37
7.1.160.0480.00814.42
7.1.150.0430.01214.33
7.1.140.0550.00814.14
7.1.130.0610.00614.23
7.1.120.0650.00814.37
7.1.110.0500.01014.45
7.1.100.0550.00414.30
7.1.90.0590.01114.28
7.1.80.0650.00514.38
7.1.70.0600.00714.42
7.1.60.0470.01420.52
7.1.50.0660.00920.38
7.1.40.0670.00920.22
7.1.30.0710.00820.42
7.1.20.0630.00820.41
7.1.10.0580.01314.30
7.1.00.0500.00914.22
7.0.330.0190.01214.27
7.0.320.0340.00415.33
7.0.310.0080.01515.26
7.0.300.0290.00715.45
7.0.290.0080.01515.21
7.0.280.0130.00915.23
7.0.270.0270.00815.23
7.0.260.0120.00815.14
7.0.250.0230.00615.02
7.0.240.0120.00815.36
7.0.230.0300.00915.18
7.0.220.0300.00015.44
7.0.210.0130.00915.28
7.0.200.0240.00415.12
7.0.190.0090.02015.29
7.0.180.0220.01415.29
7.0.170.0210.01215.20
7.0.160.0170.00415.26
7.0.150.0230.00615.25
7.0.140.0230.01015.10
7.0.130.0120.00815.16
7.0.120.0090.01215.37
7.0.110.0200.01015.31
7.0.100.0170.01015.16
7.0.90.0210.00915.05
7.0.80.0340.00315.16
7.0.70.0340.00315.29
7.0.60.0170.02115.26
7.0.50.0300.00415.26
7.0.40.0240.01115.24
7.0.30.0210.01015.15
7.0.20.0230.01315.23
7.0.10.0240.01215.36
7.0.00.0180.01115.18
5.6.400.0210.01114.77
5.6.390.0150.01115.08
5.6.380.0160.00614.63
5.6.370.0210.00815.75
5.6.360.0280.00615.45
5.6.350.0100.01415.79
5.6.340.0240.00415.45
5.6.330.0120.02015.58
5.6.320.0130.01315.64
5.6.310.0190.00915.49
5.6.300.0130.02315.71
5.6.290.0180.01415.73
5.6.280.0170.00915.43
5.6.270.0190.00515.82
5.6.260.0030.01615.57
5.6.250.0230.01015.62
5.6.240.0210.01015.71
5.6.230.0180.02215.78
5.6.220.0270.01415.46
5.6.210.0240.01415.67
5.6.200.0210.01015.63
5.6.190.0260.00715.86
5.6.180.0200.02115.75
5.6.170.0270.01415.50
5.6.160.0230.00815.75
5.6.150.0220.01315.41
5.6.140.0240.01615.86
5.6.130.0250.01615.64
5.6.120.0270.01215.73
5.6.110.0280.01315.74
5.6.100.0220.01815.91
5.6.90.0320.00515.74
5.6.80.0140.02515.55
5.6.70.0310.00615.55
5.6.60.0180.02115.74
5.6.50.0300.01015.71
5.6.40.0180.01315.62
5.6.30.0240.01215.60
5.6.20.0220.01615.52
5.6.10.0290.01015.80
5.6.00.0230.01415.57

preferences:
61.81 ms | 401 KiB | 5 Q