On Mon, 2012-07-30 at 19:31 +0200, Gustavo Lopes wrote:
> https://wiki.php.net/rfc/incompat_ctx
> 
> An RFC for deprecating and removing $this from incompatible context.
> 
> Comments are welcome.
> 
> -- 
> Gustavo Lopes

I'm just a user, but I'd like to beg that the feature not be
removed, at least not without having an ini setting for at least
a couple of years.  As the RFC states, "This feature can, however, 
be used  to implement trait-like behavior, and I'm sure someone
somewhere did such a thing."  I know in our company's code, such 
uses were frequent.  I believe they are still common.  Refactoring 
often doesn't fit the schedule.  I doubt we're unusual in allowing
classes to do more than they should instead of separating code
off into a trait or making other high level changes.  Note that
traits have only been available since March 1, 2012 (php 5.4.0).

I don't think axing register globals is very relevant.  Perhaps after
traits have been available for several years the comparison would
be better.  With register globals, a good alternative (the $_
variables) have been around for many years.  With traits, a good
alternative has been around for a few months.  I think the point
of mentioning register globals is just to say "We've made huge
BC breaks before."  That doesn't make it less painful.

Off-topic, but to show a potentially higher priority...
If you want to get rid of class related WTF, please put
get_class() back to the way it used to be.  Right now, calling
get_class() with a variable that is null is the same as calling
get_class with no arguments.  I can imagine why that might be
convenient for the implementation, but it is terribly confusing.

Thanks for listening.

- Todd


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to