3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[\Attribute(\Attribute::TARGET_PROPERTY)] final class AutowireProperty {} class A { #[AutowireProperty] protected string $foo; } class B extends A { } $fooA = new \ReflectionProperty(A::class, 'foo'); $fooB = new \ReflectionProperty(B::class, 'foo'); echo "Class A: "; var_export($fooA->getAttributes()[0]->getName()); echo "\n"; echo "Class B: "; var_export($fooA->getAttributes()[0]->getName()); echo "\n";

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.4.120.0090.01124.14
8.4.110.0100.01018.65
8.4.100.0130.00717.83
8.4.90.0150.00618.70
8.4.80.0050.00418.00
8.4.70.0130.00917.79
8.4.60.0070.00318.71
8.4.50.0060.00517.59
8.4.40.0000.00817.91
8.4.30.0150.00324.27
8.4.20.0070.01319.49
8.4.10.0060.00319.59
8.3.250.0120.00718.58
8.3.240.0120.00716.23
8.3.230.0100.00616.52
8.3.220.0130.00517.27
8.3.210.0120.00416.43
8.3.200.0070.00216.68
8.3.190.0060.01217.21
8.3.180.0080.01018.42
8.3.170.0090.00917.34
8.3.160.0070.01018.73
8.3.150.0070.01118.91
8.3.140.0040.00416.38
8.3.130.0100.00716.45
8.3.120.0110.00816.54
8.3.110.0410.00016.39
8.3.100.0350.01416.42
8.3.90.0380.01016.29
8.3.80.0280.01616.48
8.3.70.0440.00316.34
8.3.60.0370.01216.15
8.3.50.0310.01416.17
8.3.40.0280.00917.42
8.3.30.0360.00417.34
8.3.20.0320.00717.43
8.3.10.0230.00817.61
8.3.00.0060.01217.58
8.2.290.0100.00920.25
8.2.280.0050.00318.13
8.2.270.0130.00616.52
8.2.260.0120.00617.40
8.2.250.0000.00816.54
8.2.240.0340.00016.65
8.2.230.0210.00916.43
8.2.220.0120.00916.41
8.2.210.0120.00616.58
8.2.200.0360.00316.54
8.2.190.0320.00416.34
8.2.180.0290.00616.46
8.2.170.0370.00317.61
8.2.160.0380.00817.45
8.2.150.0430.00317.33
8.2.140.0280.00617.54
8.2.130.0350.00017.61
8.2.120.0190.00417.36
8.2.110.0280.00317.54
8.2.100.0420.00617.51
8.2.90.0380.01217.73
8.2.80.0230.01917.41
8.2.70.0300.01217.43
8.2.60.0410.00017.49
8.2.50.0370.00317.49
8.2.40.0270.01117.43
8.2.30.0280.01017.41
8.2.20.0260.01217.46
8.2.10.0310.00817.23
8.2.00.0300.01317.17
8.1.330.0120.00722.07
8.1.320.0100.00918.21
8.1.310.0040.00418.21
8.1.300.0280.01115.69
8.1.290.0340.00615.79
8.1.280.0300.00716.17
8.1.270.0250.00917.33
8.1.260.0300.00317.40
8.1.250.0360.00617.28
8.1.240.0240.00817.21
8.1.230.0370.00417.39
8.1.220.0270.01317.18
8.1.210.0380.00317.15
8.1.200.0310.00717.25
8.1.190.0370.00516.89
8.1.180.0380.00616.88
8.1.170.0250.01217.08
8.1.160.0240.00917.16
8.1.150.0200.01717.09
8.1.140.0290.01017.10
8.1.130.0380.00516.97
8.1.120.0310.00816.95
8.1.110.0290.00717.18
8.1.100.0300.00617.27
8.1.90.0300.00617.25
8.1.80.0220.01516.97
8.1.70.0280.00917.06
8.1.60.0320.00817.23
8.1.50.0310.00917.36
8.1.40.0270.01516.89
8.1.30.0290.00417.33
8.1.20.0310.00917.43
8.1.10.0320.00817.24
8.1.00.0320.00916.96

preferences:
27.7 ms | 403 KiB | 5 Q