Re: [PHP-DEV] PHP 4.0 Bug #8937: unset() in context with GLOBAL

2001-01-26 Thread Björn Schotte

* [EMAIL PROTECTED] wrote:
> unset() in context with GLOBAL has a serious bug. This bug appeard,

Have a closer look at

   http://bugs.php.net/bugs.php?id=1971

and the commentary of Zeev. You have to
use unset($GLOBALS["x"]);

-- 
Björn Schotte[EMAIL PROTECTED]
http://rent-a-phpwizard.de/  [EMAIL PROTECTED]

Wishlist: http://www.amazon.de/exec/obidos/wishlist/2SOEML0XDN2R5

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8937: unset() in context with GLOBAL

2001-01-26 Thread aulbach

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.3pl1
PHP Bug Type: Scripting Engine problem
Bug description:  unset() in context with GLOBAL

unset() in context with GLOBAL has a serious bug. This bug appeard,
when I changed a PHP3-program to PHP4. The problem is now,
that constructs like the following are several times in this old program.

Sorry, I haven't checked, if this problem is fixed in 4.0.4. If so, perhaps someone 
can tell me? TIA.

Think this problem depends Zend, cause ZEND_CHANGES tells me:

"unset() is no longer a function, but a statement.  It was never
documented as a function so the impact should be no bigger than nada."

I have made a test-case:

"; flush();
mydirname($dir);
$x[$dir]=true;
}
}

$dir="/hugo/bla/fasel/test"; # first char must be '/' !

unset($x);
test1($dir);
echo "DIRS called with function test1(): "; print_r($x);

echo "";

unset($x);
test2($dir);
echo "DIRS called with function test2(): "; print_r($x);

?>


-- 
Edit Bug report at: http://bugs.php.net/?id=8937&edit=1



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]