1--TEST--
2ReflectionAttribute::__toString
3--FILE--
4<?php
5
6#[Foo, Bar(a: "foo", b: 1234), Baz("foo", 1234), X(NO_ERROR), Y(new stdClass)]
7function foo() {}
8
9$refl = new ReflectionFunction('foo');
10echo $refl->getAttributes()[0];
11echo $refl->getAttributes()[1];
12echo $refl->getAttributes()[2];
13echo $refl->getAttributes()[3];
14echo $refl->getAttributes()[4];
15
16?>
17--EXPECT--
18Attribute [ Foo ]
19Attribute [ Bar ] {
20  - Arguments [2] {
21    Argument #0 [ a = 'foo' ]
22    Argument #1 [ b = 1234 ]
23  }
24}
25Attribute [ Baz ] {
26  - Arguments [2] {
27    Argument #0 [ 'foo' ]
28    Argument #1 [ 1234 ]
29  }
30}
31Attribute [ X ] {
32  - Arguments [1] {
33    Argument #0 [ NO_ERROR ]
34  }
35}
36Attribute [ Y ] {
37  - Arguments [1] {
38    Argument #0 [ new \stdClass() ]
39  }
40}
41