xref: /PHP-7.3/ext/reflection/tests/bug32981.phpt (revision 610c7fbe)
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===DONE===
25--EXPECT--
26string(4) "test"
27array(1) {
28  [0]=>
29  array(1) {
30    ["enabled"]=>
31    bool(true)
32  }
33}
34===DONE===
35