bug32981.phpt 521 B

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