3v4l.org

run code in 300+ PHP versions simultaneously
<?php // native PHPStan class AbstractClass { public $attributes; public function getAttribute(string $name) { return $this->attributes[$name] ?? null; } public function setAttribute(string $name, $value): void { $this->attributes[$name] = $value; } } // Rector faking trait AttributesTrait { public $attributes; public function getAttribute(string $name) { return $this->attributes[$name] ?? null; } public function setAttribute(string $name, $value): void { $this->attributes[$name] = $value; } } final class SomeNode extends AbstractClass { use AttributesTrait; } $someNode = new SomeNode(); $someNode->setAttribute('test', 'yes'); var_dump($someNode->getAttribute('test'));

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.5.00.0130.00920.05
8.4.150.0010.00114.05
8.4.140.0130.00817.75
8.4.130.0070.00418.93
8.4.120.0120.00524.19
8.4.110.0130.00718.60
8.4.100.0110.00818.61
8.4.90.0110.00920.38
8.4.80.0130.00718.86
8.4.70.0110.00518.86
8.4.60.0090.00618.72
8.4.50.0090.00917.86
8.4.40.0070.01319.57
8.4.30.0030.01620.53
8.4.20.0100.01017.70
8.4.10.0000.00919.72
8.3.280.0110.00818.32
8.3.270.0130.00916.67
8.3.260.0100.00616.75
8.3.250.0070.00818.76
8.3.240.0100.00817.00
8.3.230.0120.00816.50
8.3.220.0030.00418.88
8.3.210.0110.00218.97
8.3.200.0060.00316.71
8.3.190.0090.01117.41
8.3.180.0120.00816.64
8.3.170.0120.00616.97
8.3.160.0040.01418.24
8.3.150.0130.00717.31
8.3.140.0060.00318.28
8.3.130.0030.00618.31
8.3.120.0090.00619.13
8.3.110.0080.00016.62
8.3.100.0060.00318.32
8.3.90.0060.00326.77
8.3.80.0100.00019.36
8.3.70.0090.00616.75
8.3.60.0030.01816.38
8.3.50.0200.00018.20
8.3.40.0040.01218.76
8.3.30.0090.00618.85
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0100.00520.28
8.2.280.0090.00918.54
8.2.270.0090.00616.81
8.2.260.0090.00919.05
8.2.250.0050.00518.53
8.2.240.0060.00318.38
8.2.230.0040.00420.94
8.2.220.0090.00024.06
8.2.210.0040.00426.77
8.2.200.0060.00318.88
8.2.190.0030.01018.41
8.2.180.0150.00625.92
8.2.170.0110.00418.95
8.2.160.0170.00322.96
8.2.150.0000.00725.66
8.2.140.0040.01124.66
8.2.130.0040.00426.16
8.2.120.0080.00021.03
8.2.110.0000.00921.93
8.2.100.0060.00617.91
8.2.90.0040.00417.75
8.2.80.0050.00318.73
8.2.70.0070.00417.87
8.2.60.0000.00718.16
8.2.50.0060.00318.10
8.2.40.0090.00021.15
8.2.30.0040.00419.25
8.2.20.0000.00718.06
8.2.10.0000.00819.32
8.2.00.0040.00419.32
8.1.330.0070.00322.12
8.1.320.0120.00716.32
8.1.310.0040.00716.99
8.1.300.0030.00618.08
8.1.290.0090.00030.84
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00621.80
8.1.230.0080.00417.89
8.1.220.0030.00517.77
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0000.00820.67
8.1.150.0040.00418.94
8.1.140.0050.00218.96
8.1.130.0000.00720.15
8.1.120.0000.00717.35
8.1.110.0030.00517.46
8.1.100.0000.00817.46
8.1.90.0040.00417.51
8.1.80.0060.00317.29
8.1.70.0000.00717.52
8.1.60.0050.00217.60
8.1.50.0060.00317.53
8.1.40.0040.00417.53
8.1.30.0000.00817.53
8.1.20.0080.00017.51
8.1.10.0040.00417.52
8.1.00.0050.00317.58
8.0.300.0030.00618.77
8.0.290.0040.00416.75
8.0.280.0030.00318.46
8.0.270.0030.00317.92
8.0.260.0070.00020.15
8.0.250.0040.00416.96
8.0.240.0030.00316.94
8.0.230.0070.00016.81
8.0.220.0030.00316.91
8.0.210.0000.00716.87
8.0.200.0040.00416.97
8.0.190.0080.00016.88
8.0.180.0040.00416.81
8.0.170.0050.00316.87
8.0.160.0040.00416.89
8.0.150.0080.00016.89
8.0.140.0040.00416.89
8.0.130.0000.00513.37
8.0.120.0000.00816.84
8.0.110.0040.00416.89
8.0.100.0040.00416.77
8.0.90.0080.00016.96
8.0.80.0060.00916.81
8.0.70.0000.00716.76
8.0.60.0000.00816.89
8.0.50.0030.00416.70
8.0.30.0140.00317.21
8.0.20.0080.01017.16
8.0.10.0100.00817.16
8.0.00.0100.00717.10
7.4.330.0000.00415.55
7.4.320.0060.00016.55
7.4.300.0070.00316.59
7.4.290.0040.00416.49
7.4.280.0030.00516.43
7.4.270.0000.00716.61
7.4.260.0030.00313.28
7.4.250.0000.00716.62
7.4.240.0020.00516.54
7.4.230.0040.00416.36
7.4.220.0020.00516.56
7.4.210.0100.00516.61
7.4.200.0030.00316.51
7.4.160.0110.00516.54
7.4.150.0110.01116.65
7.4.140.0000.01716.14
7.4.130.0150.00316.45
7.4.120.0040.01916.46
7.4.110.0070.01016.28
7.4.100.0110.00616.46
7.4.90.0030.01316.29
7.4.80.0120.00816.62
7.4.70.0080.00816.35
7.4.60.0170.00616.53
7.4.50.0160.00616.52
7.4.40.0130.00316.39
7.4.30.0140.00316.20
7.4.20.0070.01016.42
7.4.10.0060.01016.43
7.4.00.0140.00916.55
7.3.330.0040.00416.33
7.3.320.0030.00313.34
7.3.310.0000.00716.38
7.3.300.0030.00316.28
7.3.290.0110.00416.39
7.3.270.0140.00316.44
7.3.260.0070.01016.27
7.3.250.0050.01016.52
7.3.240.0170.00016.59
7.3.230.0070.01016.57
7.3.220.0110.00516.47
7.3.210.0120.00916.29
7.3.200.0070.01516.49
7.3.190.0030.01316.50
7.3.180.0100.01316.60
7.3.170.0070.01016.27
7.3.160.0030.01716.22
7.3.150.0060.01016.35
7.3.140.0040.01216.49
7.3.130.0100.00616.30
7.3.120.0120.01216.32
7.3.110.0100.01316.37
7.3.100.0050.01116.61
7.3.90.0040.01216.46
7.3.80.0040.01316.25
7.3.70.0150.00616.41
7.3.60.0160.00316.34
7.3.50.0100.01316.34
7.3.40.0120.00916.39
7.3.30.0130.00916.39
7.3.20.0110.01116.45
7.3.10.0060.01616.26
7.3.00.0060.01616.45

preferences:
32.69 ms | 403 KiB | 5 Q