Using $GLOBALS array in an object
| From: | Bob Silva | Date: | Fri, 21 Apr 2000 08:40:11 +0000 |
| Subject: | Using $GLOBALS array in an object | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13860@lists.php.net to get a copy of this message | ||
In one master include file at the top outside any objects I have:
$CACHE_ROOT = "/cache";
then inside an object later in the same page I have:
Line 370: var $CACHE_DIR = $GLOBALS["CACHE_ROOT"];
This is giving a parse error:
Parse error: parse error in libBravenet.php on line 370
I have a very similar line where I am setting a class var to a GLOBALS
variable and it dies there as well.
This code has worked fine in PHP3 for ages, so I cant figure out whats going
on.
I do have the optimizer installed, but even disabling that didnt help.
Any ideas?