private var = $_SESSION["var"];

private var = $_SESSION["var"];

am 16.10.2007 21:12:05 von turnitup

Any idea why this fails in a class declaration?

Re: private var = $_SESSION["var"];

am 16.10.2007 21:18:29 von luiheidsgoeroe

On Tue, 16 Oct 2007 21:12:05 +0200, turnitup wrote:
> Any idea why this fails in a class declaration?

RTFM

http://www.php.net/manual/en/language.oop5.basic.php
"The default value must be a constant expression, not (for example) a
variable, a class member or a function call."
--
Rik Wasmus

Re: private var = $_SESSION["var"];

am 18.10.2007 11:20:15 von turnitup

Rik Wasmus wrote:
> On Tue, 16 Oct 2007 21:12:05 +0200, turnitup wrote:
>> Any idea why this fails in a class declaration?
>
> RTFM
>
> http://www.php.net/manual/en/language.oop5.basic.php
> "The default value must be a constant expression, not (for example) a
> variable, a class member or a function call."
> --Rik Wasmus

Thank you Rik. I knew it could not accept functions, I did not know
about session vars.