Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61913 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62349 invoked from network); 1 Aug 2012 11:22:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Aug 2012 11:22:33 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 64.22.89.133 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 64.22.89.133 oxmail.registrar-servers.com Linux 2.6 Received: from [64.22.89.133] ([64.22.89.133:40944] helo=oxmail.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/D4-32875-67119105 for ; Wed, 01 Aug 2012 07:22:32 -0400 Received: from app2.ox.registrar-servers.com (app2.ox.registrar-servers.com [172.20.180.4]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id 95AEDC30004; Wed, 1 Aug 2012 07:22:27 -0400 (EDT) Date: Wed, 1 Aug 2012 12:22:27 +0100 (BST) Reply-To: Andrew Faulds To: Gustavo Lopes , Will Fitch Cc: "internals@lists.php.net" Message-ID: <154746340.257991.1343820147355.JavaMail.open-xchange@oxwebmail.registrar-servers.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v6.20.3-Rev2 Subject: Re: [PHP-DEV] [RFC] Remove calls with incompatible Context From: ajf@ajf.me (Andrew Faulds) Slightly off-topic, $this being equal to NULL reminds me of how ECMAScript 5 changed the value of "this" to "undefined" in strict mode when not being called as a method. I agree it's a more sensible solution, as the disappearance of a variable might be more difficult to deal with than a variable changing value. With the latter, you can just do var_dump($this) and see it is now NULL, which I expect would be less confusing than it suddenly not being present. On 30 July 2012 at 21:13 Gustavo Lopes wrote: > Em Mon, 30 Jul 2012 19:42:59 +0200, Will Fitch > escreveu: > > > I think this is a good idea. I agree with the intention of throwing > > E_DEPRECATED in 5.5, but what do you propose happen afterwards? Throw a > > fatal error? I would just like to make "removing (in the next version)" > > a little more definitive. > > > > As much as I'd like to have an error at call site here, the most sensible > option is to just have $this === null inside the callee, like when you do: > > class A { function foo() {} } > A::foo(); // E_STRICT > > I'll update the RFC with this. > > -- > Gustavo Lopes > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Andrew Faulds http://ajf.me/