3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[\Attribute] final class Attr1 {} #[\Attribute] final class Attr2 {} final class A { public function __construct( #[Attr1] #[Attr2] public string $a ) {} } $reflection = new \ReflectionClass(A::class); var_dump(array_keys($reflection->getConstructor()->getParameters()[0]->getAttributes(Attr2::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.4.10.0130.00619.45
8.3.140.0040.00417.27
8.3.130.0030.00618.38
8.3.120.0130.00320.64
8.3.110.0090.00020.94
8.3.100.0050.00316.49
8.3.90.0060.00318.46
8.3.80.0060.00318.31
8.3.70.0110.01116.50
8.3.60.0150.00416.64
8.3.50.0040.01118.31
8.3.40.0000.01421.90
8.3.30.0110.00320.38
8.3.20.0090.00923.74
8.3.10.0120.00623.43
8.3.00.0130.00720.71
8.2.260.0110.00716.68
8.2.250.0070.01316.71
8.2.240.0120.00418.74
8.2.230.0130.00322.58
8.2.220.0030.00624.06
8.2.210.0030.00626.77
8.2.200.0090.00318.54
8.2.190.0040.01116.58
8.2.180.0040.01116.75
8.2.170.0070.00718.96
8.2.160.0100.00322.96
8.2.150.0200.00020.70
8.2.140.0090.00922.25
8.2.130.0080.01122.14
8.2.120.0120.00321.00
8.2.110.0140.00721.07
8.2.100.0110.00320.70
8.2.90.0140.00720.71
8.2.80.0110.00420.83
8.2.70.0100.01020.37
8.2.60.0100.00720.45
8.2.50.0160.00320.70
8.2.40.0060.01220.57
8.2.30.0000.01520.52
8.2.20.0120.00320.45
8.2.10.0040.01120.61
8.2.00.0140.00720.51
8.1.300.0090.00019.60
8.1.290.0080.00030.84
8.1.280.0110.00425.92
8.1.270.0160.00323.98
8.1.260.0100.00723.82
8.1.250.0100.00724.02
8.1.240.0060.00920.26
8.1.230.0070.00720.40
8.1.220.0130.00620.54
8.1.210.0070.01320.21
8.1.200.0110.00420.54
8.1.190.0040.01120.34
8.1.180.0100.00320.04
8.1.170.0090.00920.39
8.1.160.0150.00620.25
8.1.150.0100.00720.47
8.1.140.0110.00420.27
8.1.130.0110.00320.52
8.1.120.0110.00720.29
8.1.110.0150.00420.19
8.1.100.0120.00320.34
8.1.90.0070.01020.22
8.1.80.0140.00321.30
8.1.70.0070.00720.33
8.1.60.0110.00420.17
8.1.50.0070.00720.41
8.1.40.0120.00620.47
8.1.30.0070.01120.32
8.1.20.0110.00721.71
8.1.10.0140.00320.52
8.1.00.0060.00920.26

preferences:
30.57 ms | 403 KiB | 5 Q