xref: /PHP-8.3/ext/reflection/tests/bug32981.phpt (revision f8d79582)
1--TEST--
2Reflection Bug #32981 (ReflectionMethod::getStaticVariables() causes apache2.0.54 seg fault)
3--FILE--
4<?php
5
6class TestClass
7{
8    static function test()
9    {
10        static $enabled = true;
11    }
12}
13
14$class = new ReflectionClass('TestClass');
15foreach ($class->getMethods() as $method)
16{
17    var_dump($method->getName());
18    $arr_static_vars[] = $method->getStaticVariables();
19}
20
21var_dump($arr_static_vars);
22
23?>
24--EXPECT--
25string(4) "test"
26array(1) {
27  [0]=>
28  array(1) {
29    ["enabled"]=>
30    bool(true)
31  }
32}
33