3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { public static $currentValue; public static $value; 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(); 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.55
8.3.50.0110.00522.11
8.3.40.0090.00918.67
8.3.30.0060.01019.09
8.3.20.0030.00620.30
8.3.10.0080.00022.05
8.3.00.0050.00322.29
8.2.180.0140.00716.63
8.2.170.0000.01422.96
8.2.160.0040.01119.04
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0040.01126.16
8.2.120.0030.00519.48
8.2.110.0100.00021.02
8.2.100.0060.00617.78
8.2.90.0040.00419.13
8.2.80.0000.00917.97
8.2.70.0000.01017.63
8.2.60.0100.00017.93
8.2.50.0040.00418.07
8.2.40.0040.00419.89
8.2.30.0040.00417.96
8.2.20.0070.00017.61
8.2.10.0080.00017.77
8.2.00.0050.00217.70
8.1.280.0110.01125.92
8.1.270.0040.00422.05
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0090.00021.36
8.1.230.0120.00017.45
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0100.00017.22
8.1.190.0030.00617.22
8.1.180.0040.00418.61
8.1.170.0090.00018.50
8.1.160.0070.00022.07
8.1.150.0050.00218.61
8.1.140.0040.00717.38
8.1.130.0000.00817.84
8.1.120.0050.00217.29
8.1.110.0040.00417.30
8.1.100.0040.00417.44
8.1.90.0040.00417.33
8.1.80.0030.00517.44
8.1.70.0030.00317.35
8.1.60.0100.00017.43
8.1.50.0050.00317.46
8.1.40.0030.00617.55
8.1.30.0080.00017.60
8.1.20.0000.00817.64
8.1.10.0040.00417.55
8.1.00.0000.00817.45
8.0.300.0040.00418.77
8.0.290.0040.00416.58
8.0.280.0030.00518.38
8.0.270.0040.00417.32
8.0.260.0000.00816.71
8.0.250.0030.00316.89
8.0.240.0050.00316.89
8.0.230.0030.00316.90
8.0.220.0070.00016.76
8.0.210.0030.00316.71
8.0.200.0040.00416.86
8.0.190.0070.00016.86
8.0.180.0040.00416.75
8.0.170.0030.00616.75
8.0.160.0000.00716.82
8.0.150.0050.00316.81
8.0.140.0050.00216.82
8.0.130.0050.00013.20
8.0.120.0080.00016.83
8.0.110.0000.00716.82
8.0.100.0060.00316.87
8.0.90.0030.00516.86
8.0.80.0110.00716.84
8.0.70.0040.00416.96
8.0.60.0000.00816.75
8.0.50.0050.00216.75
8.0.30.0140.00717.01
8.0.20.0110.01017.40
8.0.10.0050.00217.09
8.0.00.0120.00816.68
7.4.330.0000.00515.00
7.4.320.0000.00616.45
7.4.300.0070.00016.62
7.4.290.0000.00716.57
7.4.280.0040.00416.51
7.4.270.0000.00716.63
7.4.260.0030.00316.54
7.4.250.0050.00316.46
7.4.240.0020.00516.60
7.4.230.0000.00716.64
7.4.220.0120.00916.73
7.4.210.0080.00716.55
7.4.200.0040.00416.63
7.4.190.0030.00316.48
7.4.160.0130.00416.45
7.4.150.0110.00517.40
7.4.140.0050.01417.86
7.4.130.0080.01016.49
7.4.120.0120.00516.43
7.4.110.0120.00616.42
7.4.100.0060.01216.52
7.4.90.0130.01016.43
7.4.80.0160.00719.39
7.4.70.0070.01016.31
7.4.60.0060.01216.41
7.4.50.0030.00516.37
7.4.40.0040.01122.77
7.4.30.0030.01416.50
7.4.00.0040.00814.71
7.3.330.0000.00513.39
7.3.320.0060.00013.14
7.3.310.0040.00416.34
7.3.300.0000.00716.42
7.3.290.0030.01016.31
7.3.280.0110.00516.41
7.3.270.0120.00417.40
7.3.260.0130.01216.41
7.3.250.0080.01016.39
7.3.240.0140.00316.35
7.3.230.0080.00916.42
7.3.210.0030.01416.36
7.3.200.0040.01319.39
7.3.190.0130.00716.43
7.3.180.0060.00916.46
7.3.170.0030.01316.59
7.3.160.0090.00616.23
7.3.120.0070.00415.08
7.2.330.0120.00516.49
7.2.320.0100.00716.42
7.2.310.0040.01816.66
7.2.300.0030.01316.62
7.2.290.0080.00816.80
7.2.00.0040.00819.19
7.1.100.0040.00718.06
7.1.70.0070.00017.11
7.1.60.0140.01019.82
7.1.50.0140.01116.93
7.1.00.0070.09322.44
7.0.200.0080.00816.61
7.0.140.0030.07722.08
7.0.60.0070.08719.91
7.0.50.0030.05717.88
7.0.40.0070.04020.11
7.0.30.0400.07320.10
7.0.20.0130.05020.35
7.0.10.0170.04020.23
7.0.00.0070.08720.33
5.6.280.0070.07021.01
5.6.210.0070.08320.55
5.6.200.0130.04018.20
5.6.190.0130.03720.34
5.6.180.3470.04020.67
5.6.170.0130.04720.51
5.6.160.0100.04720.50
5.6.150.0030.08018.15
5.6.140.0070.07718.29
5.6.130.0030.09018.14
5.6.120.0130.08021.01
5.6.110.0100.07020.97
5.6.100.0030.04321.09
5.6.90.0000.05021.04
5.6.80.0070.04320.39
5.6.70.0300.04020.40
5.5.350.0070.08720.42
5.5.340.0170.07018.02
5.5.330.0000.06720.34
5.5.320.0300.07720.41
5.5.310.0130.05720.41
5.5.300.0170.05318.05
5.5.290.0100.06318.01
5.5.280.0130.08320.99
5.5.270.0070.06020.77
5.5.260.0100.08320.89
5.5.250.0030.06020.67
5.5.240.0130.04720.29
5.4.450.0700.05019.31
5.4.440.0730.05719.60
5.4.430.0130.05319.52
5.4.420.0170.06319.21
5.4.410.0130.05019.11
5.4.400.1030.00018.54
5.4.390.0730.00018.51
5.4.380.0330.05318.60
5.4.370.1130.05318.83
5.4.360.1100.05018.70
5.4.350.1000.05718.78
5.4.340.0970.06018.79
5.4.320.0050.03712.50
5.4.310.0050.03912.50
5.4.300.0090.03412.50
5.4.290.0060.03712.50
5.4.280.0060.03512.40
5.4.270.0060.03612.40
5.4.260.0070.05318.86
5.4.250.0100.05318.91
5.4.240.0070.05018.97
5.4.230.0100.04718.77
5.4.220.0300.04719.07
5.4.210.0130.07018.81
5.4.200.0030.05318.91
5.4.190.0030.05718.77
5.4.180.0100.08318.94
5.4.170.0100.05719.07
5.4.160.0130.04719.06
5.4.150.0070.08318.76
5.4.140.0070.05316.32
5.4.130.0070.05316.54
5.4.120.0030.06716.52
5.4.110.0070.06016.59
5.4.100.0130.04716.63
5.4.90.0130.04716.38
5.4.80.0100.04716.38
5.4.70.0100.04716.48
5.4.60.0100.05016.57
5.4.50.0070.04716.45
5.4.40.0130.06716.42
5.4.30.0070.07016.41
5.4.20.0100.06316.50
5.4.10.0200.06716.27
5.4.00.0100.05715.83
5.3.290.0060.04412.80
5.3.280.0030.05314.69
5.3.270.0030.06014.62
5.3.260.0030.05714.62
5.3.250.0030.05314.60
5.3.240.0000.05714.52
5.3.230.0100.04714.69
5.3.220.0130.05014.41
5.3.210.0070.05314.74
5.3.200.0030.06714.75
5.3.190.0030.05714.65
5.3.180.0100.04714.55
5.3.170.0000.05714.55
5.3.160.0100.05714.57
5.3.150.0030.05314.56
5.3.140.0130.04314.70
5.3.130.0100.06314.72
5.3.120.0100.05314.55
5.3.110.0200.06314.73
5.3.100.0100.05014.23
5.3.90.0070.06714.20
5.3.80.0130.04313.86
5.3.70.0070.05314.01
5.3.60.0100.07014.07
5.3.50.0170.04714.04
5.3.40.0070.05014.04
5.3.30.0000.05313.91
5.3.20.0030.06013.80
5.3.10.0070.05013.74
5.3.00.0130.04013.87
5.2.170.0070.04711.06
5.2.160.0030.04311.15
5.2.150.0100.03711.14
5.2.140.0030.04010.98
5.2.130.0170.05011.34
5.2.120.0100.03311.18
5.2.110.0100.05011.19
5.2.100.0030.05711.29
5.2.90.0070.04011.27
5.2.80.0070.03711.32
5.2.70.0070.04711.18
5.2.60.0000.04311.13
5.2.50.0030.04010.86
5.2.40.0030.04011.09
5.2.30.0070.03710.99
5.2.20.0100.04010.80
5.2.10.0030.05310.96
5.2.00.0170.04310.82
5.1.60.0070.0379.98
5.1.50.0130.03710.02
5.1.40.0030.05010.04
5.1.30.0100.04710.42
5.1.20.0030.04310.58
5.1.10.0100.04010.15
5.1.00.0070.04010.18
5.0.50.0130.0308.54
5.0.40.0100.0308.51
5.0.30.0070.0378.15
5.0.20.0130.0178.39
5.0.10.0070.0238.16
5.0.00.0000.0438.12
4.4.90.0000.0236.78
4.4.80.0000.0206.75
4.4.70.0070.0206.75
4.4.60.0030.0306.75
4.4.50.0000.0236.75
4.4.40.0000.0406.75
4.4.30.0000.0236.75
4.4.20.0030.0276.74
4.4.10.0070.0276.74
4.4.00.0130.0306.74
4.3.110.0030.0206.74
4.3.100.0030.0206.74
4.3.90.0000.0206.74
4.3.80.0100.0276.74
4.3.70.0100.0206.74
4.3.60.0030.0236.74
4.3.50.0000.0276.74
4.3.40.0030.0306.74
4.3.30.0000.0236.74
4.3.20.0000.0236.74
4.3.10.0030.0306.74
4.3.00.0100.0209.24

preferences:
49.91 ms | 401 KiB | 5 Q