interfaces.phpt 337 B

12345678910111213141516171819
  1. --TEST--
  2. Make sure trait does not implement an interface.
  3. --FILE--
  4. <?php
  5. error_reporting(E_ALL);
  6. interface MyInterface {
  7. public function a();
  8. }
  9. trait THello implements MyInterface {
  10. public function a() {
  11. echo 'A';
  12. }
  13. }
  14. ?>
  15. --EXPECTF--
  16. Parse error: syntax error, unexpected token "implements", expecting "{" in %s on line %d