PHP 4.0 Bug #5289: Use of reset on a global array creates local array in function
| From: | alan dot frostick at iconmedialab dot com | Date: | Fri, 30 Jun 2000 18:56:24 +0000 |
| Subject: | PHP 4.0 Bug #5289: Use of reset on a global array creates local array in function | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-22901@lists.php.net to get a copy of this message | ||
From: alan.frostick@iconmedialab.com
Operating system: SunOS Solaris
PHP version: 4.0.1
PHP Bug Type: Scripting Engine problem
Bug description: Use of reset on a global array creates local array in function
$arr[]="something";
function test()
{
global $arr;
unset($arr); // removes global effect for variable
// workaround here is
# global $arr;
$arr[]="a value";
}
test();
$a=each($arr);
echo $a["value"];