Posted by Hilarion on 10/02/45 11:20
> hmmm...i don't believe you have mis-read anything. i read steve's op that
> same way you did *and* the problem he describes *does* conflict with the php
> manual. but then again, we may both be having problems with our reading
> comprehension. ;^)
:)
OK. The way I read it was:
> Say you have defined a variable $var in your main script.
>
> Now in a function you access it using:
> global $var;
I suppose the above text was clear and requires no translation.
> But you want to set it to null inside the function.
The above means "you want to unset global variable $var / set it
to null"
> DO: $var = null;
> DONT DO: unset($var);
>
> Why? Because the 2nd way removes the variable from the name space,
"Because the 2nd way removes the variable from current (function) namespace"
> and it is no longer globally available.
"You do not have acces to the global variable from current (function) scope."
> Cost me 10 hours....
Hilarion
PS.: The fact that English is not my native language is probably influencing
the way that I read it.
Navigation:
[Reply to this message]
|