Re: [SMARTY-DEV] problems with PHP5

From: Date: Sun, 22 Jun 2003 12:47:57 +0000
Subject: Re: [SMARTY-DEV] problems with PHP5
References: 1 2 3 4 5 6 7  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1670@lists.php.net to get a copy of this message
On Sun, 22 Jun 2003 11:45:00 +0200, Tom Sommer wrote (in message <20030622094535.96783.qmail@pb1.pair.com>): > I don't get it... Why can't we use $this anymore? that sort of sucks! > > Sure you can use $this inside a class. The problem is when smarty have seperate files for core function etc. and uses $this when there is no class definition in that file. The file might be included from inside another class, like Smarty.class.php (this is how i understood it works at least), and therefore referer to $this as the class that includes the file. (Correct me if im wrong). PHP5-cvs results in a fatal error when $this is used as a variable outside any class, even if the file is going to be included inside a class... otherwise php5-cvs is backward compatible, the rules are just more strict. Terje

« previous php.smarty.dev (#1670) next »