Re: [PHP-DEV] arithmetic operators in member variable assignments From: Stanislav Malyshev (stas <email protected>)
Date: 08/11/00

SL>> Upon experimentation, I was able to reproduce the error reliably with
SL>> the following code:
SL>>
SL>> <?
SL>> class thing {
SL>> var $member = 12 * 12;
SL>> }
SL>> ?>
SL>>
SL>> That produces a parse error (expecting "," or ";").
SL>>

Sure. Var initializers can be only constants. 12*12 isn't constant, it's
an experssion.

-- 
Stanislav Malyshev   stas <email protected>          
+972-3-6139665 ext.106

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>