mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
27 lines
390 B
PHP
27 lines
390 B
PHP
--TEST--
|
|
Multiple attributes in separate groups are allowed
|
|
--FILE--
|
|
<?php
|
|
|
|
#[\Foo]
|
|
#[\Bar]
|
|
const CONSTANT = 1;
|
|
|
|
$ref = new ReflectionConstant('CONSTANT');
|
|
var_dump($ref->getAttributes());
|
|
|
|
?>
|
|
--EXPECTF--
|
|
array(2) {
|
|
[0]=>
|
|
object(ReflectionAttribute)#%d (1) {
|
|
["name"]=>
|
|
string(3) "Foo"
|
|
}
|
|
[1]=>
|
|
object(ReflectionAttribute)#%d (1) {
|
|
["name"]=>
|
|
string(3) "Bar"
|
|
}
|
|
}
|