xref: /php-src/ext/reflection/tests/gh11937_2.phpt (revision f78d1d0d)
1--TEST--
2GH-11937: Segfault in format_default_value due to unexpected enum/object
3--FILE--
4<?php
5
6class Foo {}
7
8const FOOS = [new Foo()];
9
10var_dump(FOOS);
11
12require __DIR__ . '/gh11937_2.inc';
13
14echo (new ReflectionFunction('test'))->getAttributes('Attr')[0];
15
16?>
17--EXPECT--
18array(1) {
19  [0]=>
20  object(Foo)#1 (0) {
21  }
22}
23Attribute [ Attr ] {
24  - Arguments [1] {
25    Argument #0 [ FOOS ]
26  }
27}
28