variable declaration in class
| From: | Jens Lehmann | Date: | Tue, 18 Jun 2002 17:21:51 +0000 |
| Subject: | variable declaration in class | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-102739@lists.php.net to get a copy of this message | ||
Can anyone explain me why the following code causes
the parse error "... unexpected * ... " ?
class test
{
var $a = 2*10;
}
Of course I know why there's a parse error, but I don't
know the reason why PHP doesn't allow this multiplication,
although it allows a statement like e.g. var $a = 20.
I'd be thankful if anyone could enlighten me. I'm using
PHP 4.2. on Win2k.
Jens