Bug #8033 Updated: parse error

From: Date: Sat, 12 May 2001 01:37:01 +0000
Subject: Bug #8033 Updated: parse error
Groups: php.dev 
Request: Send a blank email to php-dev+get-54959@lists.php.net to get a copy of this message
ID: 8033 Updated by: sniper Reported By: ce@beer.com Old-Status: Duplicate Status: Closed Bug Type: Scripting Engine problem Operating system: PHP Version: 4.0.3pl1 Assigned To: Comments: http://www.php.net/manual/en/language.oop.php ---8<---------- Note: In PHP 4, only constant initializers for var variables are allowed. Use constructors for non-constant initializers. --------8<----- Previous Comments: --------------------------------------------------------------------------- [2000-11-29 11:10:32] ce@beer.com define(ASD, 1); define(DSA, 2); $flags = ASD | DSA; //this one is OK class test{ var $flags = ASD | DSA; // on this line it gives parse error } I downloaded the latest CVS - the same problem. I havn't test with previous versions. --------------------------------------------------------------------------- [2000-11-29 10:57:34] ce@beer.com define(ASD, 1); define(DSA, 2); $flags = ASD | DSA; //this one is OK class test{ var $flags = ASD | DSA; // on this line it gives parse error } I downloaded the latest CVS - the same problem. I havn't test with previous versions. --------------------------------------------------------------------------- [2000-11-29 10:51:27] stas@php.net var initializers can be only constants. --------------------------------------------------------------------------- [2000-11-29 10:49:37] ce@beer.com $flags = ASD | DSA; //this one is OK class test{ var $flags = ASD | DSA; // on this line it gives parse error } I downloaded the latest CVS - the same problem. I havn't test with previous versions. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=8033&edit=2

« previous php.dev (#54959) next »