Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24806 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18915 invoked by uid 1010); 21 Jul 2006 09:08:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 18899 invoked from network); 21 Jul 2006 09:08:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jul 2006 09:08:33 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; domainkeys=good DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 64.233.166.181 py-out-1112.google.com Linux 2.4/2.6 Received: from ([64.233.166.181:41736] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id FF/22-29121-F8990C44 for ; Fri, 21 Jul 2006 05:08:32 -0400 Received: by py-out-1112.google.com with SMTP id x31so74114pye for ; Fri, 21 Jul 2006 02:08:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MsYgfi+diztrkShYjx0UIs0lew39W07xT0CSzofNV/qVUm+v5TLQLqP1lKFipf4yJEkyo4cNEN2XFezd7RoBfpkdZ5ovyKY0IVyC4nhSKj3GHjVF1KRAb+m2hbvxLR+OxCusjWhUqcyrEMpyi8jHpnxJBL1EqC83/Al+y3O12rE= Received: by 10.35.78.9 with SMTP id f9mr846722pyl; Fri, 21 Jul 2006 02:08:29 -0700 (PDT) Received: by 10.35.93.18 with HTTP; Fri, 21 Jul 2006 02:08:29 -0700 (PDT) Message-ID: <10845a340607210208l2ffea986ndd77a0a0c50a9965@mail.gmail.com> Date: Fri, 21 Jul 2006 10:08:29 +0100 Reply-To: RQuadling@GoogleMail.com To: "Michael Wallner" Cc: internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: [PHP-DEV] RfC: rethink OO inheritance strictness From: rquadling@googlemail.com ("Richard Quadling") I agree with this point. The sub class is a valid entity in its own right. The methods (and the parameters) it has are part of that class. If they overwrite a parent class's method, then fine. Instance of either class would have different parameters for the same named method. If the sub class needs to call the parent then it can using parent::method(); On 21/07/06, Michael Wallner wrote: > Hi (Marcus), > > unfortunately I'm not very happy with the direction OO strictness takes > in PHP. I'm sure I'm not alone and many people second this feeling. > > > Precisely, let's have a look at the following: > > mike@honeybadger:~/build/php-5.2-debug$ cli -d"error_reporting=8191" -r 'class c{function f(){}} class d extends c{function f($a){}}' > Strict Standards: Declaration of d::f() should be compatible with that of c::f() in Command line code on line 1 > > mike@honeybadger:~/build/php-unicode-debug$ cli -d"error_reporting=8191" -r 'class c{function f(){}} class d extends c{function f($a){}}' > Fatal error: Declaration of d::f() must be compatible with that of c::f() in Command line code on line 1 > > > I *really* think that this enforcements are no good idea and > I _beg_ you that we leave this "area" to interfaces. > > > Regards, > -- > Michael > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"