3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[Attribute(Attribute::TARGET_CLASS_CONSTANT)] class TestAttribute { public function __construct(public string $value) { } } enum TestNum { #[TestAttribute('alpha value')] case ALPHA; #[TestAttribute('beta value')] case BETA; } $obj = TestNum::ALPHA; $reflection = new ReflectionClass($obj); $classAttributes = $reflection->getAttributes(TestAttribute::class); var_dump($classAttributes);

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.10.0090.00818.71
8.5.00.0090.01320.07
8.4.150.0030.00014.05
8.4.140.0130.00917.85
8.4.130.0120.00917.91
8.4.120.0140.00720.59
8.4.110.0120.00922.43
8.4.100.0150.00717.74
8.4.90.0150.00618.93
8.4.80.0030.00518.05
8.4.70.0170.00417.73
8.4.60.0130.00718.96
8.4.50.0110.01217.68
8.4.40.0130.00617.63
8.4.30.0220.01219.05
8.4.20.0250.01018.69
8.4.10.0250.00418.51
8.3.280.0130.01218.40
8.3.270.0110.01116.51
8.3.260.0040.00416.50
8.3.250.0130.00518.85
8.3.240.0100.01016.29
8.3.230.0130.00716.76
8.3.220.0040.00317.13
8.3.210.0120.00816.44
8.3.200.0080.00316.41
8.3.190.0050.00417.21
8.3.180.0100.00416.81
8.3.170.0240.00818.47
8.3.160.0210.00816.63
8.3.150.0180.01016.78
8.3.140.0190.00416.47
8.3.130.0160.00516.35
8.3.120.0130.00517.73
8.3.110.0120.00219.57
8.3.100.0150.00318.62
8.3.90.0130.00318.61
8.3.80.0200.00216.25
8.3.70.0190.00416.12
8.3.60.0140.00616.48
8.3.50.0110.00418.69
8.3.40.0400.00617.44
8.3.30.0310.00917.28
8.3.20.0310.01117.00
8.3.10.0260.00717.59
8.3.00.0220.00517.37
8.2.290.0080.01020.21
8.2.280.0100.00520.07
8.2.270.0160.01216.78
8.2.260.0180.01017.59
8.2.250.0160.00717.49
8.2.240.0180.00617.64
8.2.230.0190.00419.42
8.2.220.0190.00519.41
8.2.210.0170.00619.46
8.2.200.0330.00616.68
8.2.190.0300.01016.63
8.2.180.0330.00616.49
8.2.170.0370.01317.44
8.2.160.0220.00117.57
8.2.150.0330.01017.46
8.2.140.0390.00517.41
8.2.130.0390.00217.41
8.2.120.0360.00517.63
8.2.110.0370.00717.64
8.2.100.0320.00817.72
8.2.90.0110.00917.58
8.2.80.0350.00717.59
8.2.70.0320.00717.51
8.2.60.0350.00817.50
8.2.50.0290.00617.63
8.2.40.0240.00617.53
8.2.30.0310.00717.12
8.2.20.0290.01117.34
8.2.10.0290.00917.64
8.2.00.0290.01217.29
8.1.330.0110.00821.82
8.1.320.0100.01116.01
8.1.310.0190.00916.23
8.1.300.0130.00918.09
8.1.290.0290.01016.24
8.1.280.0270.01016.04
8.1.270.0270.01017.40
8.1.260.0300.00917.13
8.1.250.0280.00917.31
8.1.240.0290.00717.29
8.1.230.0300.00617.16
8.1.220.0270.00917.32
8.1.210.0250.00917.03
8.1.200.0330.00717.16
8.1.190.0260.00717.03
8.1.180.0240.01017.20
8.1.170.0290.00817.26
8.1.160.0270.00917.18
8.1.150.0250.01017.21
8.1.140.0300.01217.09
8.1.130.0320.00616.79
8.1.120.0200.00917.22
8.1.110.0090.00717.32
8.1.100.0210.01417.23
8.1.90.0220.01117.34
8.1.80.0270.00817.30
8.1.70.0270.00816.94
8.1.60.0310.00717.35
8.1.50.0290.00816.95
8.1.40.0310.01017.30
8.1.30.0260.00817.38
8.1.20.0190.00517.56
8.1.10.0280.00717.35
8.1.00.0290.00716.91
8.0.300.0230.00716.41
8.0.290.0290.00716.28
8.0.280.0300.01016.41
8.0.270.0220.00516.52
8.0.260.0180.00716.35
8.0.250.0180.00516.32
8.0.240.0180.00216.50
8.0.230.0230.01016.57
8.0.220.0280.00816.58
8.0.210.0260.00816.52
8.0.200.0320.00616.37
8.0.190.0240.01016.67
8.0.180.0270.00816.47
8.0.170.0230.01016.78
8.0.160.0250.00816.51
8.0.150.0250.00916.52
8.0.140.0340.00916.38
8.0.130.0280.00616.46
8.0.120.0290.00716.52
8.0.110.0290.00916.46
8.0.100.0270.00716.23
8.0.90.0290.00716.20
8.0.80.0260.01016.70
8.0.70.0260.00916.47
8.0.60.0290.00716.64
8.0.50.0270.00616.53
8.0.30.0200.00816.55
8.0.20.0250.00516.34
8.0.10.0270.01016.71
7.4.330.0280.00716.09
7.4.320.0210.01016.16
7.4.300.0240.00915.95
7.4.290.0240.00816.18
7.4.280.0220.00716.06
7.4.270.0260.00615.93
7.4.260.0240.00615.99
7.4.250.0250.00716.22
7.4.240.0240.00815.87
7.4.230.0280.00516.21
7.4.220.0290.00416.18
7.4.210.0280.00615.87
7.4.200.0280.00815.87
7.4.190.0240.00716.06
7.4.180.0310.00816.01
7.4.160.0260.00416.02
7.4.150.0220.00516.21
7.4.140.0180.00216.08
7.4.130.0230.01016.12
7.4.120.0230.00616.13
7.4.110.0230.00916.04
7.4.100.0210.00516.19
7.4.90.0270.00515.90
7.4.80.0250.00715.79
7.4.70.0190.01315.85
7.4.60.0240.00815.91
7.4.50.0240.00815.73
7.4.40.0280.00715.90
7.4.30.0260.00715.91
7.4.20.0300.00515.79
7.4.10.0300.00415.90
7.4.00.0250.00815.73

preferences:
80.97 ms | 403 KiB | 5 Q