note 8351 deleted from unset by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Thu, 07 Sep 2000 21:34:31 +0000 |
| Subject: | note 8351 deleted from unset by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4451@lists.php.net to get a copy of this message | ||
[note to editor: sorry, further clarification:]
It is actually even subtler than that. If you have a situation where before, you were doing:
global $foo;
unset($foo);
Then changing it to:
global $foo;
unset($GLOBALS['foo']);
will not unset the local $foo.
The correct fix is:
unset($GLOBALS['foo']);
global $foo;
or
global $foo;
unset($foo);
unset($GLOBALS['foo']);