ctor_in_interface_04.phpt 405 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. ZE2 A class constructor must keep the signature of base class interfaces
  3. --FILE--
  4. <?php
  5. interface constr
  6. {
  7. function __construct();
  8. }
  9. class implem implements constr
  10. {
  11. function __construct()
  12. {
  13. }
  14. }
  15. class derived extends implem
  16. {
  17. function __construct($a)
  18. {
  19. }
  20. }
  21. ?>
  22. --EXPECTF--
  23. Fatal error: Declaration of derived::__construct() must be compatible with constr::__construct() in %s on line %d