Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9381 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7131 invoked by uid 1010); 19 Apr 2004 12:34:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6920 invoked from network); 19 Apr 2004 12:34:25 -0000 Received: from unknown (HELO ammma.de) (213.83.39.131) by pb1.pair.com with SMTP; 19 Apr 2004 12:34:25 -0000 Received: from ammma.net (mail.ammma.mil [192.168.110.4]) by ammma.de (8.11.6/8.11.6/AMMMa AG) with ESMTP id i3JCYCX05670 for ; Mon, 19 Apr 2004 14:34:12 +0200 Received: from neo.wg.de (jan.ammma.mil [192.168.110.11]) by ammma.net (8.9.3p2/8.9.3/AMMMa AG) with ESMTP id OAA22309 for ; Mon, 19 Apr 2004 14:34:23 +0200 Received: from localhost (localhost [127.0.0.1]) by neo.wg.de (Postfix) with ESMTP id 70EC27D8E9 for ; Mon, 19 Apr 2004 14:39:03 +0200 (CEST) Received: by neo.wg.de (Postfix, from userid 30) id BAD6F7D8E6; Mon, 19 Apr 2004 14:39:02 +0200 (CEST) Received: from port-212-202-167-178.reverse.qsc.de (port-212-202-167-178.reverse.qsc.de [212.202.167.178]) by jan.dip.ammma.net (Horde) with HTTP for ; Mon, 19 Apr 2004 14:39:02 +0200 Message-ID: <20040419143902.kk08wwgok0kgk00g@jan.dip.ammma.net> X-Priority: 3 (Normal) Date: Mon, 19 Apr 2004 14:39:02 +0200 To: internals@lists.php.net References: <5.1.0.14.2.20040419112627.03efaa00@localhost> <5.1.0.14.2.20040419112627.03efaa00@localhost> <5.1.0.14.2.20040419130347.04ddeec8@localhost> In-Reply-To: <5.1.0.14.2.20040419130347.04ddeec8@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.0-cvs X-Originating-IP: 212.202.167.178 X-Virus-Scanned: by AMaViS-perl11-milter (http://amavis.org/) X-Virus-Scanned: by amavisd-new at wg.de Subject: Re: [PHP-DEV] Re: Interface inheritance From: jan@horde.org (Jan Schneider) Zitat von Zeev Suraski : > At 13:01 19/04/2004, Christian Schneider wrote: >> Zeev Suraski wrote: >>> Any method that implements (directly or indirectly) an interface >>> method or an abstract method, will have implementation checks fully >>> enforced, with an E_COMPILE_ERROR emitted in case of an error. >> >> Excuse my ignorance: What is defined as fully implementing the >> interface? I guess all methods have to be implemented with all the >> parameters having the same type if specified, right? What about >> extending the parameter set, especially with default values? >> E.g. is foo(A $a, $newparam = 'false) valid for foo(A $a)? > > This is valid. As long as you *can* call the function using the same > prototype as the one in the interface, it's considered to be > compatible. You can extend it using default values. +1 from a user's perspective, that is pro fatal errors on interfaces and abstract methods but not on regular methods. That's the best balance on keeping BC and introducing useful OO features. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - Neue Wege des Lernens http://www.tip4all.de - Deine private Tippgemeinschaft