bug60153.phpt 378 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #60153 (Interface method prototypes not enforced when implementd via traits.)
  3. --FILE--
  4. <?php
  5. interface IFoo {
  6. public function oneArgument($a);
  7. }
  8. trait TFoo {
  9. public function oneArgument() {}
  10. }
  11. class C implements IFoo {
  12. use TFoo;
  13. }
  14. ?>
  15. --EXPECTF--
  16. Fatal error: Declaration of C::oneArgument() must be compatible with IFoo::oneArgument($a) in %s on line %d