Re: Remove $this from incompatible context

From: Date: Fri, 13 Feb 2015 05:24:57 +0000
Subject: Re: Remove $this from incompatible context
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-82580@lists.php.net to get a copy of this message
Hi! > Such code will break, not in the first place but later on! Later on when? > You propose that every instance method not using the variable $this > internally will be magically a static method and can never ever be The difference between static method and non-static method is pretty much this - the former can't use $this. > changed to use $this without an bc break. I don't think you use "bc break" in a meaning it is usually used. Usually, "bc break" means the user code does not change, but the language or environment changes and code that worked before doesn't work anymore. That's bad. But you seem to mean that if the user changes the code to do a different thing than it did before, the code may not be correct anymore. That's only natural. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#82580) next »