FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Parse error: syntax error, unexpected T_VARIABLE
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Parse error: syntax error, unexpected T_VARIABLE [message #177330 is a reply to message #177328] Sun, 11 March 2012 07:34 Go to previous message
Une Bvue is currently offline  Une Bvue
Messages: 30
Registered: March 2012
Karma:
Member
Le 10/03/2012 22:21, Umberto Salsi a écrit :
> The expression giving the initial value of a proprty must be statically
> evaluable and must result to be NULL, FALSE, TRUE, int numbers and simple
> operations with int (+ - * / %<< >>), float numbers and simple operations with
> float (+ - * /), string and string concatenation, other named constants
> statically evaluable, or array() with keys and values that are static
> expressions as well. Functions and variables like $_SERVER are not allowed
> because can be evaluated only at runtime. This same limitation of the PHP
> interpreter holds also for: class constants; function default values.
>
> The official manual (http://www.php.net/manual/en/language.oop5.properties.php)
> only states:
>
> "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."
>
> but now you know the full story.


ok fine, cristall clear ! thanks.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: combobox
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 20:55:36 GMT 2024

Total time taken to generate the page: 0.05253 seconds