blob: 96966c364de66e52c021ce5ea6c04c5d5ff09322 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
--TEST--
Trailing comma in attribute argument list
--FILE--
<?php
#[MyAttribute(
"there",
"are",
"many",
"arguments",
)]
class Foo { }
$ref = new \ReflectionClass(Foo::class);
$attr = $ref->getAttributes()[0];
var_dump($attr->getName(), $attr->getArguments());
?>
--EXPECT--
string(11) "MyAttribute"
array(4) {
[0]=>
string(5) "there"
[1]=>
string(3) "are"
[2]=>
string(4) "many"
[3]=>
string(9) "arguments"
}
|