Edward Z. Yang wrote:
> These examples don't cause any problems because they're not in the
> object context, so $this is just another, ordinary variable. If you
> include'd the files inside something like:
The above is completely wrong, please disregard my ignorance. :-)
--
Edward Z. Yang
> so $this is just another, ordinary variable.
is it ?
try:
php -r '$this = "123";'
Fatal error: Cannot re-assign $this ;
)
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On Thursday 06 March 2008 23:51:47 Edward Z. Yang wrote:
> These examples don't cause any problems because they're not in the
> object context, so $this is just another, ordinary variable. If you
> include'd the files inside something like:
>
> class Foo {
> public function bar() {
> include
Cristian Rodriguez wrote:
> In all those cases, I expect a fatal error : cannot re-asign $this.
> right ? or Im missing something ?
These examples don't cause any problems because they're not in the
object context, so $this is just another, ordinary variable. If you
include'd the files inside some