bug73987_3.phpt 414 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #73987 (Method compatibility check looks to original definition and not parent - return types abstract)
  3. --FILE--
  4. <?php
  5. abstract class A {
  6. abstract function example();
  7. }
  8. class B extends A {
  9. function example(): int { }
  10. }
  11. class C extends B {
  12. function example(): string { }
  13. }
  14. ?>
  15. --EXPECTF--
  16. Fatal error: Declaration of C::example(): string must be compatible with B::example(): int in %s