Re: syntax error in class

From: Date: Thu, 11 Feb 2010 07:57:50 +0000
Subject: Re: syntax error in class
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-301989@lists.php.net to get a copy of this message
2010/2/11 Jim Lucas <lists@cmsws.com> > Dasn wrote: > >> I got the syntax error. Why? >> > > only constant literal is allowed. You can think that it is static complie but not on runtime . Regards, Eric, > Read the first paragraph on the following page. > > http://us3.php.net/manual/en/language.oop5.properties.php > > [quote] > ... This declaration may include an initialization, but this > initialization must be a constant value--that is, it must be able to be > evaluated at compile time and must not depend on run-time information in > order to be evaluated. > [/quote] > > Basically, anything that requires the concatenation of string parts or > usage of variables is not allowed. > > -- > Jim Lucas > > "Some men are born to greatness, some achieve greatness, > and some have greatness thrust upon them." > > Twelfth Night, Act II, Scene V > by William Shakespeare > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#301989) next »