1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/reflection/tests/ReflectionConstant_getAttributes.phpt

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"
}
}