News for hackers. Stuff that matters.
Re:JavaScript: what is "this"? by rimantas on Sunday March 21, 2010 @04:11PM (#1208487)
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.

Re:JavaScript: what is "this"? by IgorPartola on Sunday March 21, 2010 @07:14PM (#1208814)
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.