[PHP-DEV] Re: having fun with $this

2008-03-06 Thread Edward Z. Yang
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

Re: [PHP-DEV] Re: having fun with $this

2008-03-06 Thread Cristian Rodriguez
> 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

Re: [PHP-DEV] Re: having fun with $this

2008-03-06 Thread Stefan Walk
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

[PHP-DEV] Re: having fun with $this

2008-03-06 Thread Edward Z. Yang
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