Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8177 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39393 invoked by uid 1010); 26 Feb 2004 18:53:09 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39338 invoked from network); 26 Feb 2004 18:53:09 -0000 Received: from unknown (HELO mail.3gstech.com) (216.239.132.110) by pb1.pair.com with SMTP; 26 Feb 2004 18:53:09 -0000 Received: by mail.3gstech.com (Postfix, from userid 99) id 0F4DA9E7B29; Thu, 26 Feb 2004 10:53:08 -0800 (PST) Received: from www.buildabetterweb.com (www.buildabetterweb.com [216.239.132.101]) by www.3gstech.com (IMP) with HTTP for ; Thu, 26 Feb 2004 10:53:07 -0800 Message-ID: <1077821587.403e409400404@www.3gstech.com> Date: Thu, 26 Feb 2004 10:53:08 -0800 To: news@eecoo.de Cc: internals@lists.php.net References: <20040226185122.34071.qmail@pb1.pair.com> In-Reply-To: <20040226185122.34071.qmail@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 Subject: Re: [PHP-DEV] PHP5: Class behavior: method overloading From: waboring@3gstech.com ("Walter A. Boring IV") I say keep compatibility. If you want to enforce this, then declare an interface. That is after all why they exist. Walt > Hello, > > in the latest snapshot i found some very important differences to the php5 > beta 4 version concerning the behavior of inherited classes. please look at > the following example: > >
>          class MyClass extends MyParent{         
>                 function test($arg) {
>                 
>                 }
>         }       
>         
>         class MyParent {
>                 function test($arg1, $arg2) {
>                 
>                 }
>         }
>         
>         $obj = new MyClass();
> ?>
> 
> > the output is: > > Fatal error: Declaration of MyClass::test() must be compatible with that of > MyParent::test() in ... on line 3 > > > I think that this is a nice feature in the face of "compatibility", but may > cause in a complete restructure of existing class trees. The consequence is > a bad :( backward compatibility!! Personally I think it would be a good > solution to set an option in the configuration or something like this. > > other oppinions would be appreciated. > > thanks, > vivi > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >