bug37964.phpt 754 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --TEST--
  2. Reflection Bug #37964 (Reflection shows private methods of parent class)
  3. --FILE--
  4. <?php
  5. abstract class foobar {
  6. private function test2() {
  7. }
  8. }
  9. class foo extends foobar {
  10. private $foo = 1;
  11. private function test() {
  12. }
  13. protected function test3() {
  14. }
  15. }
  16. class bar extends foo {
  17. private function foobar() {
  18. }
  19. }
  20. echo new ReflectionClass(new bar);
  21. ?>
  22. --EXPECTF--
  23. Class [ <user> class bar extends foo ] {
  24. @@ %s %s
  25. - Constants [0] {
  26. }
  27. - Static properties [0] {
  28. }
  29. - Static methods [0] {
  30. }
  31. - Properties [0] {
  32. }
  33. - Methods [2] {
  34. Method [ <user> private method foobar ] {
  35. @@ %s %d - %d
  36. }
  37. Method [ <user, inherits foo> protected method test3 ] {
  38. @@ %s %d - %d
  39. }
  40. }
  41. }