Annotation of embedaddon/php/tests/classes/ctor_in_interface_02.phpt, revision 1.1
1.1 ! misho 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:
! 10: interface constr2 extends constr1
! 11: {
! 12: }
! 13:
! 14: class implem12 implements constr2
! 15: {
! 16: function __construct()
! 17: {
! 18: }
! 19: }
! 20:
! 21: interface constr3
! 22: {
! 23: function __construct($a);
! 24: }
! 25:
! 26: class implem13 implements constr1, constr3
! 27: {
! 28: function __construct()
! 29: {
! 30: }
! 31: }
! 32:
! 33: ?>
! 34: --EXPECTF--
! 35: Fatal error: Declaration of implem13::__construct() must be compatible with constr3::__construct($a) in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>