abstract_method_8.phpt 263 B

123456789101112131415161718192021
  1. --TEST--
  2. Abstract method in trait using "self"
  3. --FILE--
  4. <?php
  5. trait T {
  6. abstract private function method(self $x): self;
  7. }
  8. class C {
  9. use T;
  10. private function method(self $x): self {
  11. return $this;
  12. }
  13. }
  14. ?>
  15. ===DONE===
  16. --EXPECT--
  17. ===DONE===