From: david@php.net
Operating system: Debian Linux
PHP version: 4.0.6
PHP Bug Type: Scripting Engine problem
Bug description: unset() on a static variable causes it to forget it is static
Doing unset() on a static variable causes it to forget the fact that it is
static for the rest of the function.
e.g.
<?
function abc() {
static $a = 123;
echo "On entry, a = $a\n";
unset($a);
$a = 456;
}
abc();
abc();
?>
should give 123 then 456. It gives 123 and 123.
Replacing unset($a) with $a = null, or removing the unset() entirely has
the desired result of giving 123 then 456.
--
Edit bug report at: http://bugs.php.net/?id=13967&edit=1