3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[\Attribute(\Attribute::TARGET_METHOD)] class TestAttribute {} class ParentClass { #[TestAttribute] function foo() { } } class ChildclassA extends ParentClass {} class ChildclassB extends ParentClass { function foo() { } } $method = new \ReflectionMethod(ParentClass::class, 'foo'); var_dump($method->getAttributes(TestAttribute::class)); $method = new \ReflectionMethod(ChildClassA::class, 'foo'); var_dump($method->getAttributes(TestAttribute::class)); $method = new \ReflectionMethod(ChildClassB::class, 'foo'); var_dump($method->getAttributes(TestAttribute::class));

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.120.0060.00618.98
8.3.110.0070.01020.94
8.3.100.0050.00324.06
8.3.90.0080.00026.77
8.3.80.0100.00018.31
8.3.70.0090.00616.38
8.3.60.0060.00918.30
8.3.50.0090.00616.64
8.3.40.0070.00721.79
8.3.30.0100.01018.53
8.3.20.0070.00024.18
8.3.10.0050.00324.66
8.3.00.0100.00326.16
8.2.240.0090.00017.55
8.2.230.0130.00322.58
8.2.220.0030.00637.54
8.2.210.0060.00926.77
8.2.200.0060.00316.75
8.2.190.0160.00618.17
8.2.180.0070.00716.88
8.2.170.0090.01218.78
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0130.00324.66
8.2.130.0040.00426.16
8.2.120.0030.00619.55
8.2.110.0110.00022.19
8.2.100.0030.00620.51
8.2.90.0060.00320.46
8.2.80.0060.00320.32
8.2.70.0030.00620.36
8.2.60.0100.01320.26
8.2.50.0060.00320.50
8.2.40.0060.00320.56
8.2.30.0000.00920.32
8.2.20.0060.00320.38
8.2.10.0030.00620.32
8.2.00.0100.01320.33
8.1.300.0050.00518.51
8.1.290.0030.01230.84
8.1.280.0140.00725.92
8.1.270.0040.00424.66
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00320.34
8.1.230.0090.00020.28
8.1.220.0000.00920.18
8.1.210.0070.01521.52
8.1.200.0100.01020.13
8.1.190.0090.00920.09
8.1.180.0030.00620.17
8.1.170.0050.00520.22
8.1.160.0000.00920.06
8.1.150.0100.00020.41
8.1.140.0000.01020.23
8.1.130.0100.00020.27
8.1.120.0090.00020.34
8.1.110.0070.00320.36
8.1.100.0070.00320.09
8.1.90.0050.00520.29
8.1.80.0000.01018.42
8.1.70.0000.01018.38
8.1.60.0070.00318.38
8.1.50.0050.00518.54
8.1.40.0030.00618.59
8.1.30.0100.00018.65
8.1.20.0000.00920.45
8.1.10.0090.00020.47
8.1.00.0030.00620.28
8.0.300.0000.00919.46
8.0.290.0040.00719.62
8.0.280.0060.00319.70
8.0.270.0090.00019.70
8.0.260.0000.00919.70
8.0.250.0030.00619.73
8.0.240.0030.00719.51
8.0.230.0090.00019.68
8.0.220.0070.00319.71
8.0.210.0060.00319.55
8.0.200.0040.00719.67
8.0.190.0060.00319.62
8.0.180.0060.00319.80
8.0.170.0050.00519.45
8.0.160.0030.00619.75
8.0.150.0060.00319.42
8.0.140.0040.00419.62
8.0.130.0060.00319.38
8.0.120.0090.00019.62
8.0.110.0060.00319.57
8.0.100.0030.00619.64
8.0.90.0060.00319.67
8.0.80.0050.00519.65
8.0.70.0060.00319.70
8.0.60.0060.00319.45
8.0.50.0040.00419.62
8.0.30.0090.00019.57
8.0.20.0030.00619.75
8.0.10.0030.00719.88

preferences:
28.05 ms | 403 KiB | 5 Q