PHP 4.0 Bug #5884: Not able to unset($var) set as global in function

From: Date: Mon, 31 Jul 2000 21:29:03 +0000
Subject: PHP 4.0 Bug #5884: Not able to unset($var) set as global in function
Groups: php.dev 
Request: Send a blank email to php-dev+get-27130@lists.php.net to get a copy of this message
From: php42@hotmail.com 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

« previous php.dev (#27130) next »