[PHP-DEV] PHP 4.0 Bug #2015: static php3 incompatibility From: sander <email protected>
Date: 08/09/99

From: sander <email protected>
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.

-- 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>