1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Files
archived-php-src/ext/reflection/tests/ReflectionConstant_getAttributes.phpt
T

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