mirror of
https://github.com/php/php-src.git
synced 2026-04-26 01:18:19 +02:00
3b5986db69
This is consistent with how many other Reflection classes have a name field, and it makes debugging easier. Closes GH-12908. Closes GH-12917.
27 lines
415 B
PHP
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
|
|
)
|
|
|
|
)
|