File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / classes / ctor_in_interface_02.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:14 2013 UTC (11 years ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

    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: --EXPECTF--
   34: Fatal error: Declaration of implem13::__construct() must be compatible with constr3::__construct($a) in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>