[PHP] variable declaration in class

2002-06-18 Thread Jens Lehmann
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.

Re: [PHP] variable declaration in class

2002-06-18 Thread Analysis Solutions
On Tue, Jun 18, 2002 at 07:21:51PM +0200, Jens Lehmann wrote: 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, Because, that's why. :) --Dan -- PHP classes that make