Gustavo,

On Mon, Jul 30, 2012 at 1:31 PM, Gustavo Lopes <glo...@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

Reply via email to