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::$currentValue; } } $value = TestClass::toValue(5)->add(3)->subtract(2)->add(8)->result(); echo $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.0060.00918.46
8.3.50.0090.00621.89
8.3.40.0140.00318.79
8.3.30.0080.00819.18
8.3.20.0040.00420.16
8.3.10.0080.00022.06
8.3.00.0040.00422.57
8.2.180.0070.00716.63
8.2.170.0080.00622.96
8.2.160.0000.01419.08
8.2.150.0030.01225.66
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0040.00419.36
8.2.110.0030.00622.21
8.2.100.0040.00718.09
8.2.90.0040.00419.22
8.2.80.0040.00418.02
8.2.70.0000.00817.38
8.2.60.0070.00418.03
8.2.50.0040.00418.07
8.2.40.0050.00320.07
8.2.30.0050.00218.18
8.2.20.0050.00217.73
8.2.10.0050.00317.69
8.2.00.0000.00717.69
8.1.280.0070.01425.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00024.01
8.1.230.0000.01119.04
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.25
8.1.190.0080.00017.53
8.1.180.0040.00418.75
8.1.170.0050.00318.34
8.1.160.0040.00422.11
8.1.150.0000.00718.50
8.1.140.0030.00817.33
8.1.130.0070.00017.84
8.1.120.0050.00217.43
8.1.110.0000.00817.39
8.1.100.0030.00517.30
8.1.90.0030.00417.42
8.1.80.0070.00017.44
8.1.70.0030.00317.30
8.1.60.0060.00617.58
8.1.50.0000.00717.50
8.1.40.0000.00717.48
8.1.30.0040.00417.60
8.1.20.0040.00417.56
8.1.10.0040.00417.63
8.1.00.0000.00817.59
8.0.300.0070.00019.15
8.0.290.0070.00017.18
8.0.280.0000.00718.45
8.0.270.0000.00817.32
8.0.260.0070.00016.70
8.0.250.0030.00316.93
8.0.240.0030.00316.94
8.0.230.0000.00716.79
8.0.220.0000.00716.75
8.0.210.0000.00716.83
8.0.200.0050.00216.81
8.0.190.0060.00316.93
8.0.180.0040.00416.73
8.0.170.0040.00416.81
8.0.160.0000.00716.84
8.0.150.0000.00716.86
8.0.140.0040.00416.73
8.0.130.0050.00013.23
8.0.120.0030.00516.83
8.0.110.0000.00716.84
8.0.100.0000.00816.83
8.0.90.0040.00416.75
8.0.80.0080.00816.89
8.0.70.0090.00016.68
8.0.60.0000.00816.86
8.0.50.0040.00416.84
8.0.30.0100.01116.98
8.0.20.0050.01617.41
8.0.10.0000.00716.95
8.0.00.0100.01016.84
7.4.330.0060.00015.00
7.4.320.0000.00616.31
7.4.300.0070.00016.61
7.4.290.0000.00816.66
7.4.280.0070.00016.61
7.4.270.0030.00316.62
7.4.260.0030.00316.54
7.4.250.0030.00716.47
7.4.240.0000.00716.50
7.4.230.0030.00316.70
7.4.220.0130.01316.61
7.4.210.0050.00916.59
7.4.200.0030.00316.42
7.4.190.0080.00016.76
7.4.160.0080.00816.39
7.4.150.0130.00317.40
7.4.140.0050.01317.86
7.4.130.0050.01316.41
7.4.120.0080.01016.57
7.4.110.0120.00616.29
7.4.100.0070.01016.32
7.4.90.0120.01016.39
7.4.80.0070.01019.39
7.4.70.0070.01016.43
7.4.60.0130.00416.66
7.4.50.0060.00316.59
7.4.40.0040.01522.77
7.4.30.0140.00316.58
7.4.00.0030.00915.11
7.3.330.0060.00013.38
7.3.320.0030.00313.43
7.3.310.0070.00016.36
7.3.300.0030.00316.34
7.3.290.0100.00316.34
7.3.280.0120.00516.38
7.3.270.0110.01217.40
7.3.260.0100.01416.43
7.3.250.0110.00516.43
7.3.240.0130.01316.45
7.3.230.0100.00616.56
7.3.210.0120.00616.57
7.3.200.0160.00619.39
7.3.190.0110.00816.65
7.3.180.0070.01016.66
7.3.170.0130.01016.46
7.3.160.0160.00616.45
7.3.120.0040.00414.73
7.2.330.0160.00016.76
7.2.320.0070.01016.55
7.2.310.0160.00616.44
7.2.300.0100.00716.79
7.2.290.0060.01016.59
7.2.00.0040.01119.60
7.1.100.0080.00818.15
7.1.70.0080.00017.22
7.1.60.0140.01119.82
7.1.50.0100.01317.00
7.1.00.0070.07322.29
7.0.200.0130.00316.65
7.0.140.0000.07321.99
7.0.60.0100.07319.91
7.0.50.0000.04317.98
7.0.40.0070.04020.40
7.0.30.0330.08020.31
7.0.20.0200.03720.21
7.0.10.0070.05020.19
7.0.00.0100.05720.23
5.6.280.0000.07721.09
5.6.210.0070.08020.45
5.6.200.0030.04318.15
5.6.190.0000.04720.63
5.6.180.4100.04020.63
5.6.170.0200.04020.51
5.6.160.0170.07020.55
5.6.150.0070.04718.23
5.6.140.0100.07018.23
5.6.130.0130.08018.28
5.6.120.0070.08721.13
5.6.110.0000.05021.00
5.6.100.0030.04021.11
5.6.90.0100.05721.00
5.6.80.0100.04020.43
5.6.70.0230.06320.43
5.5.350.0000.05720.53
5.5.340.0100.07717.93
5.5.330.0270.06720.18
5.5.320.0170.07720.26
5.5.310.0230.04320.51
5.5.300.0100.03317.96
5.5.290.0070.07717.93
5.5.280.0130.07720.98
5.5.270.0030.04320.77
5.5.260.0070.06020.85
5.5.250.0130.07320.58
5.5.240.0100.05020.29
5.4.450.0670.04319.48
5.4.440.0370.06019.68
5.4.430.0200.07019.63
5.4.420.0030.06319.36
5.4.410.0130.05719.41
5.4.400.1330.00018.84
5.4.390.1930.00018.75
5.4.380.0200.06718.53
5.4.370.0830.05718.53
5.4.360.0870.06318.78
5.4.350.1000.05718.72
5.4.340.0970.05718.84
5.4.320.0120.03012.51
5.4.310.0140.04612.50
5.4.300.0040.03812.50
5.4.290.0050.03912.50
5.4.280.0060.03612.40
5.4.270.0070.04412.40
5.4.260.0030.05318.58
5.4.250.0170.04318.90
5.4.240.0100.05718.83
5.4.230.0130.05018.70
5.4.220.0170.06718.85
5.4.210.0070.05718.75
5.4.200.0100.05318.85
5.4.190.0070.05318.85
5.4.180.0170.04718.89
5.4.170.0130.04718.91
5.4.160.0100.06318.84
5.4.150.0130.05718.92
5.4.140.0100.04716.45
5.4.130.0100.04716.58
5.4.120.0130.05716.31
5.4.110.0170.04016.52
5.4.100.0100.04716.30
5.4.90.0100.05016.48
5.4.80.0100.04316.26
5.4.70.0070.05016.33
5.4.60.0200.06016.36
5.4.50.0070.06316.44
5.4.40.0030.05716.66
5.4.30.0100.05016.35
5.4.20.0130.07016.45
5.4.10.0130.05016.36
5.4.00.0330.04315.96
5.3.290.0040.04312.80
5.3.280.0100.05714.77
5.3.270.0270.04714.84
5.3.260.0070.06014.63
5.3.250.0070.05314.78
5.3.240.0030.06014.70
5.3.230.0070.05314.69
5.3.220.0130.04714.66
5.3.210.0030.06014.65
5.3.200.0030.07714.66
5.3.190.0170.05714.71
5.3.180.0100.05014.59
5.3.170.0070.06314.73
5.3.160.0070.05314.66
5.3.150.0100.05014.47
5.3.140.0100.05314.56
5.3.130.0070.05714.73
5.3.120.0070.05714.64
5.3.110.0100.05014.64
5.3.100.0030.05714.23
5.3.90.0070.06014.04
5.3.80.0030.06314.03
5.3.70.0030.06014.11
5.3.60.0170.04714.18
5.3.50.0100.04713.79
5.3.40.0100.05713.79
5.3.30.0130.04314.00
5.3.20.0000.06313.87
5.3.10.0000.05313.82
5.3.00.0070.05013.71
5.2.170.0030.05011.33
5.2.160.0100.03311.23
5.2.150.0030.04311.21
5.2.140.0000.04711.05
5.2.130.0070.04011.29
5.2.120.0130.03311.17
5.2.110.0030.04311.11
5.2.100.0100.03711.10
5.2.90.0070.04011.01
5.2.80.0130.03311.00
5.2.70.0070.04011.32
5.2.60.0070.04011.05
5.2.50.0100.04011.10
5.2.40.0170.04311.01
5.2.30.0030.04311.20
5.2.20.0170.03011.05
5.2.10.0100.04010.82
5.2.00.0100.04010.96
5.1.60.0030.03310.10
5.1.50.0100.03710.02
5.1.40.0070.05010.18
5.1.30.0070.03310.41
5.1.20.0070.03310.35
5.1.10.0130.03010.13
5.1.00.0100.03010.17
5.0.50.0100.0278.39
5.0.40.0030.0308.41
5.0.30.0070.0508.47
5.0.20.0000.0308.31
5.0.10.0030.0278.19
5.0.00.0000.0578.26
4.4.90.0030.0206.80
4.4.80.0030.0206.80
4.4.70.0000.0276.80
4.4.60.0130.0176.80
4.4.50.0030.0206.80
4.4.40.0030.0336.80
4.4.30.0070.0276.80
4.4.20.0000.0236.80
4.4.10.0070.0276.80
4.4.00.0000.0376.80
4.3.110.0030.0206.80
4.3.100.0070.0176.80
4.3.90.0070.0176.80
4.3.80.0030.0306.80
4.3.70.0070.0176.80
4.3.60.0030.0206.80
4.3.50.0030.0206.80
4.3.40.0000.0376.80
4.3.30.0100.0136.80
4.3.20.0000.0236.80
4.3.10.0030.0206.80
4.3.00.0030.0239.24

preferences:
38.54 ms | 401 KiB | 5 Q