Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7890 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 449 invoked by uid 1010); 16 Feb 2004 21:07:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 314 invoked from network); 16 Feb 2004 21:07:53 -0000 Received: from unknown (HELO punisher.appliedsec.com) (206.112.71.1) by pb1.pair.com with SMTP; 16 Feb 2004 21:07:53 -0000 Received: from appliedsec.com (localhost.applied.sec [127.0.0.1]) by punisher.appliedsec.com (Postfix) with ESMTP id 6509CE0419; Mon, 16 Feb 2004 15:42:08 -0500 (EST) Message-ID: <40313129.8060704@appliedsec.com> Date: Mon, 16 Feb 2004 16:07:53 -0500 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030807 X-Accept-Language: en-us, en MIME-Version: 1.0 To: zeev@zend.com Cc: Hans Lellelid , internals@lists.php.net References: <40305B44.20002@velum.net> <5.1.0.14.2.20040216113631.06f80cd8@localhost> In-Reply-To: <5.1.0.14.2.20040216113631.06f80cd8@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] extending interfaces - fringe behavior From: hans@appliedsec.com (Hans Lellelid) Hi - Zeev Suraski wrote: > At 07:55 16/02/2004, Hans Lellelid wrote: > >> I have a need in a current application to extend interfaces and >> possibly re-define (change signature) some of the inherited methods in >> the child interface. > ... > > > You're not supposed to change the signature when you're > extending/implementing interfaces. I'll try to see if it's feasible to > improve the checks so that they compare signatures in a smarter way > (i.e., func($arg1, $arg2=null) is compatible with func($arg1), and > currently it's not detected that way). > Yeah, I realize that wanting to change signatures of parent interfaces is a little weird; I'd submit that it does allow for some nice design possibilities -- but perhaps modifying an interface is at odds with the idea of an interface. I think I probably want to just copy & paste the methods that are the same rather than extend. Making it possible to re-define methods w/ additional null params would be nice if that makes sense. Thanks! Hans