1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Files
archived-php-src/Zend/tests/attributes/007_self_reflect_attribute.phpt
T
Máté Kocsis 7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00

24 lines
491 B
PHP

--TEST--
Attributes: attributes on Attribute return itself
--FILE--
<?php
$reflection = new \ReflectionClass(Attribute::class);
$attributes = $reflection->getAttributes();
foreach ($attributes as $attribute) {
var_dump($attribute->getName());
var_dump($attribute->getArguments());
$a = $attribute->newInstance();
var_dump(get_class($a));
var_dump($a->flags == Attribute::TARGET_ALL);
}
?>
--EXPECT--
string(9) "Attribute"
array(0) {
}
string(9) "Attribute"
bool(true)