Re: [PHP] syntax error in class

[email protected] (Eric Lee)
Newsgroups php.general
Message-ID <[email protected]>
2010/2/11 Jim Lucas <[email protected]>

> 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
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.