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();

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.0040.01118.40
8.3.50.0110.00721.87
8.3.40.0100.00618.70
8.3.30.0120.00319.17
8.3.20.0040.00420.26
8.3.10.0040.00421.92
8.3.00.0060.00322.32
8.2.180.0110.00716.88
8.2.170.0070.00722.96
8.2.160.0120.00318.94
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00919.18
8.2.110.0030.00621.06
8.2.100.0090.00317.78
8.2.90.0050.00319.21
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0030.00619.88
8.2.30.0080.00018.06
8.2.20.0000.00717.71
8.2.10.0040.00417.59
8.2.00.0080.00017.54
8.1.280.0130.00325.92
8.1.270.0050.00322.18
8.1.260.0030.00526.35
8.1.250.0000.00728.09
8.1.240.0140.00322.14
8.1.230.0070.00318.98
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0050.00517.22
8.1.190.0080.00017.23
8.1.180.0090.00018.64
8.1.170.0040.00418.53
8.1.160.0050.00222.07
8.1.150.0000.00718.58
8.1.140.0110.00017.32
8.1.130.0030.00517.84
8.1.120.0000.00717.43
8.1.110.0000.00817.46
8.1.100.0040.00417.28
8.1.90.0000.00717.43
8.1.80.0000.00717.41
8.1.70.0000.00717.38
8.1.60.0000.01117.59
8.1.50.0080.00017.45
8.1.40.0000.00817.44
8.1.30.0080.00017.60
8.1.20.0030.00517.63
8.1.10.0030.00617.48
8.1.00.0040.00417.36
8.0.300.0050.00320.09
8.0.290.0070.00016.63
8.0.280.0040.00418.27
8.0.270.0030.00617.21
8.0.260.0030.00316.68
8.0.250.0000.00716.91
8.0.240.0000.00816.88
8.0.230.0000.00716.90
8.0.220.0030.00316.71
8.0.210.0000.00616.72
8.0.200.0060.00016.88
8.0.190.0000.00716.89
8.0.180.0040.00416.90
8.0.170.0050.00316.82
8.0.160.0040.00416.93
8.0.150.0030.00316.78
8.0.140.0070.00016.75
8.0.130.0060.00013.30
8.0.120.0080.00016.82
8.0.110.0020.00516.81
8.0.100.0040.00416.66
8.0.90.0000.00716.87
8.0.80.0090.00616.82
8.0.70.0040.00416.83
8.0.60.0080.00016.88
8.0.50.0080.00016.83
8.0.30.0100.01017.01
8.0.20.0060.01517.40
8.0.10.0070.00016.99
8.0.00.0110.00816.85
7.4.330.0000.00515.00
7.4.320.0000.00616.35
7.4.300.0000.00716.52
7.4.290.0030.00316.53
7.4.280.0000.00916.49
7.4.270.0030.00316.41
7.4.260.0060.00316.62
7.4.250.0000.00816.33
7.4.240.0020.00516.57
7.4.230.0070.00016.59
7.4.220.0090.00916.55
7.4.210.0090.00916.59
7.4.200.0030.00316.52
7.4.190.0030.00316.32
7.4.160.0060.01016.33
7.4.150.0120.00617.40
7.4.140.0120.01017.86
7.4.130.0100.00916.54
7.4.120.0110.00916.56
7.4.110.0100.01316.39
7.4.100.0100.00916.50
7.4.90.0040.01516.59
7.4.80.0120.01219.39
7.4.70.0070.01016.31
7.4.60.0130.00316.53
7.4.50.0050.00316.37
7.4.40.0110.00422.77
7.4.30.0040.01216.38
7.4.00.0070.00715.14
7.3.330.0050.00013.37
7.3.320.0050.00013.22
7.3.310.0030.00316.24
7.3.300.0070.00016.32
7.3.290.0090.01016.43
7.3.280.0040.01116.36
7.3.270.0070.01017.40
7.3.260.0190.00616.68
7.3.250.0100.00816.42
7.3.240.0160.00316.73
7.3.230.0080.00816.39
7.3.210.0030.01416.61
7.3.200.0030.01319.39
7.3.190.0160.00316.37
7.3.180.0120.00316.45
7.3.170.0100.00716.40
7.3.160.0090.00616.36
7.3.120.0000.01714.77
7.3.10.0040.01116.73
7.3.00.0060.00616.64
7.2.330.0090.00916.68
7.2.320.0150.00316.74
7.2.310.0160.00316.74
7.2.300.0000.01616.50
7.2.290.0080.00816.71
7.2.130.0100.00317.02
7.2.120.0150.00016.96
7.2.110.0070.00716.89
7.2.100.0040.00816.65
7.2.90.0030.01417.07
7.2.80.0070.01117.05
7.2.70.0060.00616.91
7.2.60.0100.00516.89
7.2.50.0030.01317.05
7.2.40.0140.00316.72
7.2.30.0090.00316.75
7.2.20.0000.01316.98
7.2.10.0120.00616.67
7.2.00.0040.01017.99
7.1.250.0070.00715.79
7.1.200.0030.00915.66
7.1.100.0040.00817.96
7.1.70.0000.00717.16
7.1.60.0070.01519.82
7.1.50.0100.01616.80
7.1.00.0030.09322.31
7.0.200.0060.00616.81
7.0.140.0070.07021.99
7.0.60.0300.07020.00
7.0.50.0070.07317.84
7.0.40.0130.08020.25
7.0.30.0230.08020.26
7.0.20.0370.07720.23
7.0.10.0100.08020.23
7.0.00.0100.08020.10
5.6.280.0030.07021.16
5.6.210.0130.08020.55
5.6.200.0170.07018.12
5.6.190.0130.04320.46
5.6.180.0130.05020.35
5.6.170.0200.03720.48
5.6.160.0070.06720.57
5.6.150.0030.05718.16
5.6.140.0100.07718.14
5.6.130.0070.05718.21
5.6.120.0000.04721.00
5.6.110.0070.04021.00
5.6.100.0070.07020.99
5.6.90.0070.08720.97
5.6.80.0030.08320.41
5.5.350.0200.08020.35
5.5.340.0130.02718.05
5.5.330.0130.06720.47
5.5.320.0300.07720.25
5.5.310.0370.07020.28
5.5.300.0130.06317.98
5.5.290.0130.06318.08
5.5.280.0130.05020.88
5.5.270.0070.07020.76
5.5.260.0070.08320.89
5.5.250.0070.08720.59
5.5.240.0100.08020.36
5.4.450.0200.04019.41
5.4.440.1200.02719.57
5.4.430.0530.04719.46
5.4.420.0500.05019.41
5.4.410.0900.03319.34
5.4.400.0900.03718.85
5.4.390.0830.03319.09
5.4.380.0300.06018.74
5.4.370.0500.05318.79
5.4.360.0330.05018.63
5.4.350.0270.06318.78
5.4.340.0430.06318.72
5.4.320.0060.03612.50
5.4.310.0050.03812.50
5.4.300.0070.03512.50
5.4.290.0050.03912.50
5.4.280.0040.03712.39
5.4.270.0060.04812.40
5.4.260.0100.05018.82
5.4.250.0030.05318.96
5.4.240.0100.04718.92
5.4.230.0070.06018.94
5.4.220.0070.05318.82
5.4.210.0130.04718.75
5.4.200.0070.05318.79
5.4.190.0100.05318.81
5.4.180.0030.05318.97
5.4.170.0070.05018.82
5.4.160.0030.05318.89
5.4.150.0070.05718.79
5.4.140.0100.07316.39
5.4.130.0070.04716.51
5.4.120.0100.04316.41
5.4.110.0000.07316.34
5.4.100.0100.04716.36
5.4.90.0030.05316.56
5.4.80.0230.05316.50
5.4.70.0070.04716.46
5.4.60.0030.06016.36
5.4.50.0100.04316.43
5.4.40.0070.05016.54
5.4.30.0070.05016.52
5.4.20.0100.04716.37
5.4.10.0070.05316.29
5.4.00.0070.04716.01
5.3.290.0070.04612.80
5.3.280.0070.05014.43
5.3.270.0030.05714.75
5.3.260.0000.05714.59
5.3.250.0070.05014.60
5.3.240.0030.05714.69
5.3.230.0070.05014.68
5.3.220.0200.04314.64
5.3.210.0070.05314.66
5.3.200.0130.04314.58
5.3.190.0130.04714.64
5.3.180.0200.03714.70
5.3.170.0070.05014.58
5.3.160.0070.05714.65
5.3.150.0130.07014.63
5.3.140.0070.05314.55
5.3.130.0070.05314.54
5.3.120.0070.05314.60
5.3.110.0030.05714.73
5.3.100.0070.04714.18
5.3.90.0100.04314.10
5.3.80.0170.04014.25
5.3.70.0170.04014.12
5.3.60.0130.04314.09
5.3.50.0030.05014.03
5.3.40.0130.04014.12
5.3.30.0170.03714.13
5.3.20.0070.05013.79
5.3.10.0070.05013.84
5.3.00.0100.04313.63
5.2.170.0030.04311.24
5.2.160.0030.04011.32
5.2.150.0100.03311.24
5.2.140.0070.04011.13
5.2.130.0170.05311.29
5.2.120.0070.03711.08
5.2.110.0100.05011.07
5.2.100.0030.04311.20
5.2.90.0130.03311.16
5.2.80.0130.03711.19
5.2.70.0130.03711.05
5.2.60.0070.04011.04
5.2.50.0000.04311.25
5.2.40.0030.04010.99
5.2.30.0030.04310.97
5.2.20.0070.03711.05
5.2.10.0030.04010.96
5.2.00.0100.05010.80
5.1.60.0130.0409.98
5.1.50.0130.04010.00
5.1.40.0030.0339.95
5.1.30.0130.03710.40
5.1.20.0070.03710.43
5.1.10.0070.03310.04
5.1.00.0030.03310.09
5.0.50.0000.0308.47
5.0.40.0000.0308.25
5.0.30.0030.0408.33
5.0.20.0070.0238.30
5.0.10.0030.0278.10
5.0.00.0070.0378.32
4.4.90.0000.0236.62
4.4.80.0000.0236.62
4.4.70.0030.0206.61
4.4.60.0030.0276.52
4.4.50.0070.0276.52
4.4.40.0000.0376.52
4.4.30.0030.0206.52
4.4.20.0070.0176.52
4.4.10.0000.0236.52
4.4.00.0070.0306.52
4.3.110.0030.0206.52
4.3.100.0000.0236.52
4.3.90.0070.0136.52
4.3.80.0000.0336.52
4.3.70.0070.0136.52
4.3.60.0000.0236.52
4.3.50.0000.0236.52
4.3.40.0000.0336.52
4.3.30.0000.0236.52
4.3.20.0000.0236.52
4.3.10.0000.0236.52
4.3.00.0030.01714.47

preferences:
84.16 ms | 400 KiB | 5 Q