Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20069 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85968 invoked by uid 1010); 16 Nov 2005 17:34:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 85953 invoked from network); 16 Nov 2005 17:34:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2005 17:34:31 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:19621] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id A8/55-07637-5AD6B734 for ; Wed, 16 Nov 2005 12:34:30 -0500 Received: (qmail 23178 invoked from network); 16 Nov 2005 17:34:23 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 16 Nov 2005 17:34:23 -0000 Message-ID: <6.2.3.4.2.20051116093318.03c00e90@localhost> X-Mailer: QUALCOMM Windows Eudora Version 6.2.3.4 Date: Wed, 16 Nov 2005 09:34:18 -0800 To: Jochem Maas , php internals In-Reply-To: <437B4F37.1010507@iamjochem.com> References: <437B4F37.1010507@iamjochem.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] interface method visibility. From: andi@zend.com (Andi Gutmans) Please read the archives where discussions took place. As you stated it would be "abusing" the notion of what interfaces are. Take a look at abstract classes. That might help you. Andi At 07:24 AM 11/16/2005, Jochem Maas wrote: >why does the engine care about the visibility of interface methods I declare? >I understand the argument that interface methods only have 'meaning' >when applied >as public methods of objects - but thats rather academic and personally I can >think of useful ways to abuse interfaces using protected methods at >the very least >why am I not allowed to do this just because someone decided that >its not correct? > >and given that I can implement a non-static method without using >$this or any other symbol/code >related to the instantiated object (effectively creating a static >method) which I can >call using static notation why not allow static interface methods? > >also I noticed that using the keyword 'abstract' with a interface >method declaration >is all of a sudden (5.1RC5dev) causing a fatal error where before >(5.0.2 - 5.0.4) >no error what so ever. > >If 'static', 'protected', 'private' are not allowed with interfaces >(very unpragmatic imho) >then why the fatal errors? why not an E_STRICT and just ignore those >declaration... especially >because not declaring a method static and leaving off the visibility >leaves you with a >method that is non-static and public - exactly what an interface 'requires'. > >rgds, >Jochem > >---- > >some might ask why I am asking - well the motive is quite simple: > > "I try to stay on top of php developments, trying out to > the best of my > abilities new features whenever I see an opportunity. > partly for fun, partly > to be able to encourage/help others to step up to the php5 > plate. lately I > _feel_ I am being punished more and more for trying to keep > abreast due to BC breaks > (some of which, I realise, are very much required) and more > annoyingly abitrary > changes in behaviour." > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php