Class declaration, constants and array
| From: | Marek | Date: | Fri, 28 Jan 2005 20:50:22 +0000 |
| Subject: | Class declaration, constants and array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-207635@lists.php.net to get a copy of this message | ||
php5 class {
const _SOMETHING_ = 'test';
private $abc=_SOMETHING_; // fails, well actually anything fails
similar to this.
var $test=$test2; // also fails
So since I can not use dynamic var assignment within the class declaration,
what are some of the easy solutions to this ? without making anything global
to the script ?
Thanks