Re: PHP 4.0 Bug #8033 Updated: parse error

From: Date: Wed, 29 Nov 2000 16:28:15 +0000
Subject: Re: PHP 4.0 Bug #8033 Updated: parse error
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-39596@lists.php.net to get a copy of this message
It's not a bug It;s intended that way Vars in classes can only be initalized with constants insteed do this: class test {
        var $flags = FALSE;
        functio Test () {
                $this->flags = ASD | DSA;
        }
} Greetz, Wico At 16:10 29-11-00 +0000, ce@beer.com wrote:
ID: 8033 User Update by: ce@beer.com Old-Status: Closed Status: Duplicate Bug Type: Scripting Engine problem Description: parse error 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. Previous Comments: --------------------------------------------------------------------------- [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. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8033 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.dev (#39596) next »