Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82734 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68841 invoked from network); 15 Feb 2015 18:10:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Feb 2015 18:10:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.179 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.179 mail-wi0-f179.google.com Received: from [209.85.212.179] ([209.85.212.179:35471] helo=mail-wi0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/79-06835-DF0E0E45 for ; Sun, 15 Feb 2015 13:10:05 -0500 Received: by mail-wi0-f179.google.com with SMTP id hi2so21864846wib.0 for ; Sun, 15 Feb 2015 10:10:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=TkHMgnBH2LtoScv9ynOJe7bf150jSivKoN9xY4orahI=; b=gSZSQOCspaHEqWsPkJt7CEbMVLjCH3Y8QW9cag5OsgfguRgdVMH3O9ee3q0WuHSZM/ w2I0vP1NweFykm543Bg8/Znj+iQBPogb1xFNReJjHLxAagvFp4qvWNDgNKr9vz5vNY2C wbClAQzocWzgXVRRkAFW8a6+xPgrNyuNVDer/Cb4iAcfQWoIkfc5OyM7bVFI6wpShg+x JMZHJezTBFz2jLFiHIa1xgD3yx4trVrr4HnWywvj0fixjq50CIXRYPaoS0x8S9XYX9Lp /DfKbRJPFaqXukY8+5RAxQHszPW5tQSos0yV41L0S/nBgB/htiTZWI0sd2RcTbURvDty JvbA== X-Received: by 10.194.121.168 with SMTP id ll8mr28169954wjb.35.1424023801390; Sun, 15 Feb 2015 10:10:01 -0800 (PST) Received: from [31.123.0.107] ([31.123.0.107]) by mx.google.com with ESMTPSA id cf12sm19239025wjb.10.2015.02.15.10.10.00 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 15 Feb 2015 10:10:00 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: <54DFAA20.4000900@mabe.berlin> References: <54DD1BB1.1090501@gmail.com> <54DD815F.70504@mabe.berlin> <54DD8AA9.3040808@gmail.com> <752856272.5008.1423809953291.JavaMail.open-xchange@app07.ox.hosteurope.de> <54DDAC30.7090206@gmail.com> <54DFAA20.4000900@mabe.berlin> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Sun, 15 Feb 2015 18:09:54 +0000 To: internals Message-ID: <0C346B4A-94E7-4865-9698-044F21FDBC5F@gmail.com> Subject: Re: [PHP-DEV] Remove $this from incompatible context From: rowan.collins@gmail.com (Rowan Collins) On 14 February 2015 20:03:44 GMT, Marc Bennewitz wrote: >Hi >Am 13.02.2015 um 08:48 schrieb Stanislav Malyshev: >> Hi! >> >>> there should be no bc break as the API doesn't change and the method >>> produces the exact same result as before. >> Sorry, this makes no sense to me. You claim that if you changed the >> method code to do different thing it should continue working as if >you >> didn't change it? Why? I just don't get it. >> >>> It's not a good thing to magically change the method API in base of >a >>> method body that's not port of the API. >> "magically change the method API"? What are you talking about? You >> changed the code, not magic. >> >Sorry it wasn't clear. I hope I will now: > >The static modifier for methods is part of the method signature and >method body isn't. >(That's way interfaces doesn't describe method bodies but signatures) > >The static modifier defines a method as static and therefore defines >the >method is callable using "::". More specifically, it defines that the method is *only* callable statically. There is currently no opposite keyword to say that a method can only be called non-statically, but the absence of a modifier has up until now meant that either call type is possible. An interface cannot currently forbid static calls, only the use of $this. Our choice is between keeping that ambiguity, and introducing a new rule that any method not marked static must never be called statically (with provisos for technically non-static parent:: etc). Regards, -- Rowan Collins [IMSoP]