Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20064 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23367 invoked by uid 1010); 16 Nov 2005 15:24:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23351 invoked from network); 16 Nov 2005 15:24:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2005 15:24:44 -0000 X-Host-Fingerprint: 194.109.193.120 unknown Linux 2.4/2.6 Received: from ([194.109.193.120:34610] helo=mx1.moulin.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 97/DC-07637-C3F4B734 for ; Wed, 16 Nov 2005 10:24:44 -0500 Received: from localhost (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id B99BD186EBD for ; Wed, 16 Nov 2005 16:24:45 +0100 (CET) Received: from mx1.moulin.nl ([127.0.0.1]) by localhost (moulin [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04784-01 for ; Wed, 16 Nov 2005 16:24:44 +0100 (CET) Received: from [192.168.1.16] (bspr.xs4all.nl [194.109.161.228]) by mx1.moulin.nl (Postfix) with ESMTP id 64A27DD264 for ; Wed, 16 Nov 2005 16:24:44 +0100 (CET) Message-ID: <437B4F37.1010507@iamjochem.com> Date: Wed, 16 Nov 2005 16:24:39 +0100 User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: php internals X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at moulin.nl Subject: interface method visibility. From: jochem@iamjochem.com (Jochem Maas) 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."