xref: /PHP-8.1/ext/reflection/tests/bug63614.phpt (revision df3b9a1e)
1--TEST--
2Bug #63614 (Fatal error on Reflection)
3--FILE--
4<?php
5function dummy() {
6   static $a = array();
7}
8
9class Test
10{
11    const A = 0;
12
13    public function func()
14    {
15        static $a  = array(
16            self::A   => 'a'
17        );
18    }
19}
20
21$reflect = new ReflectionFunction("dummy");
22print_r($reflect->getStaticVariables());
23$reflect = new ReflectionMethod('Test', 'func');
24print_r($reflect->getStaticVariables());
25?>
26--EXPECT--
27Array
28(
29    [a] => Array
30        (
31        )
32
33)
34Array
35(
36    [a] => Array
37        (
38            [0] => a
39        )
40
41)
42