[PHP-DEV] PHP 4.0 Bug #5884: Not able to unset($var) set as global in function From: php42 <email protected>
Date: 07/31/00

From: php42 <email protected>
Operating system: Linux
PHP version: 4.0.1pl2
PHP Bug Type: Other
Bug description: Not able to unset($var) set as global in function

<?
$test="test";

function foo() {
  global $test;
  $test = $test . " - foo";
  unset($test);
}

foo();
if (isset($test)) { echo "Set: $test"; } else { echo "Unset"; }
echo "<br>";
unset($test);
if (isset($test)) { echo "Set: $test"; } else { echo "Unset"; }

?>

echos out:

Set: test - foo
Unset

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>