Re: [RFC] Remove calls with incompatible Context

From: Date: Mon, 30 Jul 2012 17:48:12 +0000
Subject: Re: [RFC] Remove calls with incompatible Context
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-61881@lists.php.net to get a copy of this message
Gustavo, On Mon, Jul 30, 2012 at 1:31 PM, Gustavo Lopes <glopes@nebm.ist.utl.pt>wrote: > > https://wiki.php.net/rfc/**incompat_ctx<https://wiki.php.net/rfc/incompat_ctx> > > An RFC for deprecating and removing $this from incompatible context. > > Comments are welcome. A few points. 1. Finally! It's caused a lot of WTF moments. 2. I have seen it in production code. Usually it wasn't intentional, but changing it would definitely break things pretty bad... (Not a reason not to change it, just pointing out that I have come across it). 3. You'd need to be careful to ensure that the error is raised only when the called class is not in the same tree. http://codepad.viper-7.com/sOLCDu Otherwise it would be difficult to call grand-parent code (skipping the parent, if needed)... Nice job. Anthony

« previous php.internals (#61881) next »