Re: Re: PHP 4.0 Bug #5289 Updated: Use of reset on a global array creates local array in function
| From: | Stanislav Malyshev | Date: | Thu, 29 Jun 2000 21:11:55 +0000 |
| Subject: | Re: Re: PHP 4.0 Bug #5289 Updated: Use of reset on a global array creates local array in function | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-22968@lists.php.net to get a copy of this message | ||
AF>> To change all references to $GLOBALS wouldn't fulfil my need here.
AF>> Wouldn't unset($GLOBALS["name"]) just do the same thing?
No.
AF>> To my mind the fact that a given variable is defined global should be
AF>> retained after using unset, it should merely initialise the array to
AF>> empty but keep it global for further references in the function.
That's not how global works. You may try to talk Zend authors into
changing the way global works, but I'm not sure you'll have any success.
"global" means "link this local variable to that global one", not "make
this variable global". Use $GLOBALS for the latter.
--
Stanislav Malyshev stas@zend.com
+972-3-6139665