|
Posted by amygdala on 12/17/04 11:55
"Umberto Salsi" <salsi@icosaedro.italia> schreef in bericht
news:ebo5tm$tb6$1@nnrp.ngi.it...
> "amygdala" <noreply@noreply.com> wrote:
>
>> The full array is this (part of a session class):
>>
>> private $config = array(
>> 'sessionTable' => DB_TABLE_SESSIONS,
>> 'userTable' => DB_TABLE_USERS,
>> 'persistentMaxTime' => 60*60*24*30,
>> 'sessionMaxInactive' => 60*30,
>> 'regenerateId' => true,
>> 'idRegenerationInterval' => 10,
>> 'cookieName' => 'PHPSESSION',
>> 'cookiePath' => '/',
>> 'checkIp' => true,
>> 'checkAgent' => true
>> );
>>
>> which yields the error:
>>
>> Parse error, parse error, unexpected '*', expecting ')' on line 49 (which
>> is
>> the line of 'persistentMaxTime')
>
> That's an invalid syntax: the default value of a class property must be
> a static_scalar, that is a simple number, a string or an array of these
> items. Other expressions are not allowed.
Clear! Thanks.
> Here is a chunk from the EBNF syntax of PHP 5:
>
> static_scalar = common_scalar
> | T_STRING
> | "+" static_scalar
> | "-" static_scalar
> | "array" "(" [static_array_pair_list] ")"
> | static_class_constant ;
>
> static_array_pair_list = static_array_pair { "," static_array_pair } [","]
> ;
>
> static_array_pair = static_scalar ["=>" static_scalar] ;
>
> Check the official BNF syntax Zend/zend_language_parser.y
> (http://www.icosaedro.it/articoli/php-syntax-yacc.txt)
> or the equivalent EBNF syntax translated by me from that file
> (http://www.icosaedro.it/articoli/php-syntax-ebnf.txt)
>
Eehh, thanks for the suggestions, but I think I'll pass trying to grasp
what's going on in those files ;)
[Back to original message]
|