Posted by Jerry Stuckle on 11/29/06 15:16
Thomas Mlynarczyk wrote:
> Also sprach Jerry Stuckle:
>
>
>>$GLOBALS['notDefinedYet'] = $x;
>>will not give a notice.
>>$x = $GLOBALS['notDefinedYet'];
>>will. See the difference?
>
>
> Yes, of that I was aware.
>
>
>>global($notDefinedYet);
>>Doesn't actually use the value. It just declares it to be global.
>
>
> I thought
>
> global $myVar;
>
> was the equivalent of
>
> if ( !isSet( $GLOBALS['myVar'] ) )
> {
> $GLOBALS['myVar'] = null;
> }
>
> $myVar = &$GLOBALS['myVar'];
>
> Greetings,
> Thomas
>
>
I don't think it actually sets $GLOBALS['myVar'] to null, but I could be
wrong. I use globals very rarely.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|