bug63614.phpt 556 B

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