mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
20 lines
325 B
PHP
20 lines
325 B
PHP
--TEST--
|
|
ReflectionConstant::getAttributes() with attribute
|
|
--FILE--
|
|
<?php
|
|
|
|
#[Foo]
|
|
const CT_CONST = 42;
|
|
$reflectionConstant = new ReflectionConstant('CT_CONST');
|
|
var_dump($reflectionConstant->getAttributes());
|
|
|
|
?>
|
|
--EXPECTF--
|
|
array(1) {
|
|
[0]=>
|
|
object(ReflectionAttribute)#%d (1) {
|
|
["name"]=>
|
|
string(3) "Foo"
|
|
}
|
|
}
|