Comment on JavaScript: what is "this"?parentComments−rimantas16yglobal $a in PHP is just another way to write $a =& $GLOBALS['a'];I.e. you just create reference to a global variable. Unsetting reference just breaks the tie between variable name and content.−IgorPartola16yExactly, which means that unset( $a ) is not the same thing as unset( $GLOBALS['a'] ). It makes perfect sense, just not a kind of thing you might not expect at first.
Comments
global $a in PHP is just another way to write $a =& $GLOBALS['a'];
I.e. you just create reference to a global variable. Unsetting reference just breaks the tie between variable name and content.
Exactly, which means that unset( $a ) is not the same thing as unset( $GLOBALS['a'] ). It makes perfect sense, just not a kind of thing you might not expect at first.