1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 01:18:19 +02:00
Files
Niels Dossche 3b5986db69 Implement GH-12908: Show attribute name/class in ReflectionAttribute dump
This is consistent with how many other Reflection classes have a name
field, and it makes debugging easier.

Closes GH-12908.
Closes GH-12917.
2024-02-04 23:02:02 +01:00

27 lines
415 B
PHP

--TEST--
GH-12908 (Show attribute name/class in ReflectionAttribute dump)
--FILE--
<?php
#[\AllowDynamicProperties, \Foo]
class Test {
}
print_r((new ReflectionClass(Test::class))->getAttributes());
?>
--EXPECT--
Array
(
[0] => ReflectionAttribute Object
(
[name] => AllowDynamicProperties
)
[1] => ReflectionAttribute Object
(
[name] => Foo
)
)