[EMAIL PROTECTED] wrote:
> From: "Zoltán Németh" <[EMAIL PROTECTED]>
>>> function example($elem='') {
>>> static $store = array();
>> AFAIK the above line should cause an error on the second run of the
>> function, as you declare the same static variable for the second time.
>>
>> or am I wrong?
indeed you are :-)
>
> I think so - otherwise static Variables would be quite senseless. The line
> starting with static is (so do I think) once evaluated at compile-time or at
> the first run and the ignored.
I believe it's a compile time definition ... which is the reason you can only
initialize static vars with scalar values (and not the result of expressions or
resources or objects, etc)
>
> Thomas
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php