PHP 4.0 Bug #2015: static php3 incompatibility
| From: | sander at pilon dot com | Date: | Mon, 09 Aug 1999 23:21:56 +0000 |
| Subject: | PHP 4.0 Bug #2015: static php3 incompatibility | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9702@lists.php.net to get a copy of this message | ||
From: sander@pilon.com
Operating system: Linux 2.2
PHP version: 4.0 Beta 2
PHP Bug Type: Scripting Engine problem
Bug description: static php3 incompatibility
function test()
{
static $test1;
echo "BEFORE: $test1 <BR>";
unset($test1);
$test1 = "Hello";
echo "AFTER: $test1 <BR>";
}
test(); test();
Output:
BEFORE:
AFTER: Hello
--
BEFORE:
AFTER: Hello
Should be:
BEFORE:
AFTER: Hello
--
BEFORE: Hello
AFTER: Hello
Works fine if you remove the unset();
Works fine in PHP3.