3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class TestClass { public static $currentValue; public static function toValue($value) { self::$currentValue = $value; return static::class; } public static function add($value) { self::$currentValue = self::$currentValue + $value; return static::class; } public static function subtract($value) { self::$currentValue = self::$currentValue - $value; return static::class; } public static function result() { return self::$currentValue; } } $value = TestClass::toValue(5)::add(3)::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.0110.00418.18
8.3.50.0070.00716.28
8.3.40.0120.00918.66
8.3.30.0070.00718.76
8.3.20.0060.00324.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.180.0070.00725.92
8.2.170.0140.00019.09
8.2.160.0070.00722.96
8.2.150.0060.00325.66
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0070.00026.16
8.2.110.0040.00420.43
8.2.100.0040.00817.66
8.2.90.0040.00417.63
8.2.80.0040.00418.83
8.2.70.0040.00417.50
8.2.60.0040.00717.93
8.2.50.0040.00418.07
8.2.40.0080.00019.88
8.2.30.0030.00518.13
8.2.20.0000.00918.25
8.2.10.0040.00419.13
8.2.00.0000.00719.24
8.1.280.0040.01125.92
8.1.270.0040.00424.01
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.10
8.1.230.0030.01117.75
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0060.00317.13
8.1.190.0090.00017.23
8.1.180.0050.00318.10
8.1.170.0030.00718.48
8.1.160.0040.00418.79
8.1.150.0070.00418.82
8.1.140.0070.00018.82
8.1.130.0030.00320.14
8.1.120.0070.00017.42
8.1.110.0030.00517.42
8.1.100.0000.00817.43
8.1.90.0000.00717.28
8.1.80.0070.00317.28
8.1.70.0000.00717.28
8.1.60.0060.00317.33
8.1.50.0030.00717.54
8.1.40.0050.00217.51
8.1.30.0080.00017.72
8.1.20.0040.00417.61
8.1.10.0060.00317.59
8.1.00.0000.00717.57
8.0.300.0050.00318.77
8.0.290.0040.00416.63
8.0.280.0030.00318.30
8.0.270.0030.00317.97
8.0.260.0000.00618.53
8.0.250.0030.00316.94
8.0.240.0000.00716.85
8.0.230.0070.00016.95
8.0.220.0030.00416.82
8.0.210.0030.00516.72
8.0.200.0030.00316.80
8.0.190.0000.00716.88
8.0.180.0080.00016.84
8.0.170.0000.00816.73
8.0.160.0040.00416.78
8.0.150.0040.00416.80
8.0.140.0070.00016.70
8.0.130.0080.00013.19
8.0.120.0000.00816.82
8.0.110.0000.00816.88
8.0.100.0000.00716.65
8.0.90.0070.00016.71
8.0.80.0130.00916.80
8.0.70.0120.01016.77
8.0.60.0070.01416.79
8.0.50.0150.00616.71
8.0.30.0090.01316.70
8.0.20.0030.01316.77
8.0.10.0100.00716.86
8.0.00.0100.01016.88
7.4.330.0050.00015.55
7.4.320.0030.00316.46
7.4.300.0040.00416.65
7.4.290.0050.00316.53
7.4.280.0050.00316.60
7.4.270.0000.00716.55
7.4.260.0030.00516.51
7.4.250.0000.00716.45
7.4.240.0040.00416.53
7.4.230.0040.00416.39
7.4.220.0000.00816.62
7.4.210.0040.01116.60
7.4.200.0180.00316.48
7.4.190.0120.00316.61
7.4.180.0040.01116.39
7.4.160.0000.01416.50
7.4.150.0030.01216.46
7.4.140.0120.00316.59
7.4.130.0110.00316.36
7.4.120.0100.00716.45
7.4.110.0140.00016.39
7.4.100.0070.00716.44
7.4.90.0040.01116.55
7.4.80.0120.00816.49
7.4.70.0100.01016.37
7.4.60.0100.00316.43
7.4.50.0110.00316.35
7.4.40.0100.00416.32
7.4.30.0040.01116.39
7.4.20.0090.00516.42
7.4.10.0070.00716.49
7.4.00.0100.00316.54
7.3.330.0000.00616.34
7.3.320.0030.00313.31
7.3.310.0060.00316.35
7.3.300.0040.00416.36
7.3.290.0070.01316.37
7.3.280.0100.01016.25
7.3.270.0130.00616.34
7.3.260.0070.01016.36
7.3.250.0030.01016.32
7.3.240.0080.01216.34
7.3.230.0110.00316.29
7.3.220.0070.01316.23
7.3.210.0100.00316.29
7.3.200.0030.01016.21
7.3.190.0000.01316.22
7.3.180.0060.00816.26
7.3.170.0100.00316.29
7.3.160.0100.00316.23
7.3.150.0030.01016.29
7.3.140.0100.00716.22
7.3.130.0090.00916.17
7.3.120.0030.01716.27
7.3.110.0100.00616.16
7.3.100.0130.00316.23
7.3.90.0030.01316.52
7.3.80.0130.00316.28
7.3.70.0150.00316.32
7.3.60.0060.01116.46
7.3.50.0070.01016.45
7.3.40.0080.01216.37
7.3.30.0150.00616.44
7.3.20.0160.00016.49
7.3.10.0090.00616.35
7.3.00.0070.00716.46

preferences:
38.87 ms | 400 KiB | 5 Q