bug72496.phpt 671 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --TEST--
  2. Bug #72496 (declare public method with signature incompatible with parent private method should not throw a warning)
  3. --FILE--
  4. <?php
  5. class Foo
  6. {
  7. private function getFoo()
  8. {
  9. return 'Foo';
  10. }
  11. private function getBar()
  12. {
  13. return 'Bar';
  14. }
  15. private function getBaz()
  16. {
  17. return 'Baz';
  18. }
  19. }
  20. class Bar extends Foo
  21. {
  22. public function getFoo($extraArgument)
  23. {
  24. return $extraArgument;
  25. }
  26. protected function getBar($extraArgument)
  27. {
  28. return $extraArgument;
  29. }
  30. private function getBaz($extraArgument)
  31. {
  32. return $extraArgument;
  33. }
  34. }
  35. echo "OK\n";
  36. ?>
  37. --EXPECT--
  38. OK