2 ms·
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 t
by rimantas 17y ago
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.
- IgorPartola 17y agoExactly, 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.