ctor_in_interface_02.phpt 506 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. ZE2 A class constructor must keep the signature of all interfaces
  3. --FILE--
  4. <?php
  5. interface constr1
  6. {
  7. function __construct();
  8. }
  9. interface constr2 extends constr1
  10. {
  11. }
  12. class implem12 implements constr2
  13. {
  14. function __construct()
  15. {
  16. }
  17. }
  18. interface constr3
  19. {
  20. function __construct($a);
  21. }
  22. class implem13 implements constr1, constr3
  23. {
  24. function __construct()
  25. {
  26. }
  27. }
  28. ?>
  29. --EXPECTF--
  30. Fatal error: Declaration of implem13::__construct() must be compatible with constr3::__construct($a) in %s on line %d