2010/2/11 Jim Lucas <li...@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
>
>

Reply via email to