bug55137.phpt 321 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Bug #55137 (Changing trait static method visibility)
  3. --FILE--
  4. <?php
  5. trait A {
  6. protected static function foo() { echo "abc\n"; }
  7. private static function bar() { echo "def\n"; }
  8. }
  9. class B {
  10. use A {
  11. A::foo as public;
  12. A::bar as public baz;
  13. }
  14. }
  15. B::foo();
  16. B::baz();
  17. ?>
  18. --EXPECT--
  19. abc
  20. def