Weird change between PHP3 and PHP4
| From: | Jon Ribbens | Date: | Thu, 07 Sep 2000 12:10:54 +0000 |
| Subject: | Weird change between PHP3 and PHP4 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-32535@lists.php.net to get a copy of this message | ||
I have just been trying to upgrade a server from PHP3 to PHP4 (mainly
to get HTTP_POST_FILES ;-) ).
It appears (and is documented) that 'unset' has been changed between
PHP3 and PHP4. If you 'unset' a 'global'ised variable then it does
not unset the variable.
I understand what it is doing. I don't understand why this change was
made, because the old behaviour was useful, and I don't see what is
useful about the new behaviour.
What is the way to unset a global variable from within a function now?
Is unset($GLOBALS['foo']) the recommended thing to do? Should this be
documented?