Posted by Thomas Mlynarczyk on 11/29/06 14:37
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
Navigation:
[Reply to this message]
|