1--TEST--
2Attributes: attributes on Attribute return itself
3--FILE--
4<?php
5
6$reflection = new \ReflectionClass(Attribute::class);
7$attributes = $reflection->getAttributes();
8
9foreach ($attributes as $attribute) {
10    var_dump($attribute->getName());
11    var_dump($attribute->getArguments());
12
13    $a = $attribute->newInstance();
14    var_dump(get_class($a));
15    var_dump($a->flags == Attribute::TARGET_CLASS);
16}
17?>
18--EXPECT--
19string(9) "Attribute"
20array(1) {
21  [0]=>
22  int(1)
23}
24string(9) "Attribute"
25bool(true)
26