Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82697 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49608 invoked from network); 14 Feb 2015 20:03:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2015 20:03:50 -0000 Authentication-Results: pb1.pair.com header.from=dev@mabe.berlin; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dev@mabe.berlin; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mabe.berlin from 80.237.132.167 cause and error) X-PHP-List-Original-Sender: dev@mabe.berlin X-Host-Fingerprint: 80.237.132.167 wp160.webpack.hosteurope.de Received: from [80.237.132.167] ([80.237.132.167:45615] helo=wp160.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/D0-41866-42AAFD45 for ; Sat, 14 Feb 2015 15:03:49 -0500 Received: from dslb-088-074-069-254.088.074.pools.vodafone-ip.de ([88.74.69.254] helo=[192.168.178.30]); authenticated by wp160.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1YMiwK-0004qU-Vl; Sat, 14 Feb 2015 21:03:45 +0100 Message-ID: <54DFAA20.4000900@mabe.berlin> Date: Sat, 14 Feb 2015 21:03:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Stanislav Malyshev , Nikita Popov , internals 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> In-Reply-To: <54DDAC30.7090206@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;dev@mabe.berlin;1423944228;d8d5f911; Subject: Re: [PHP-DEV] Remove $this from incompatible context From: dev@mabe.berlin (Marc Bennewitz) 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 "::". What I mean with "magically" is that you like to define a method as static without the static modifier in base of the method body but the body isn't part of the signature. Now if you change the method body only without this very special knowledge into something using $this you break all code that calls the method statically. So for me a +1 to throw an E_DEPRECATED error in this case and remove this feature in PHP 8. This will inform existing applications about the wrong call and provide enough time to be fixed. Marc