Print out what it’s deleting and enable warnings to see what’s actually happening! =)
$GLOBALS
contains GLOBALS
. You unset
it, which removes the actual global variable. If this were just pass-by-reference behaviour, you would get an empty array, not NULL
.