PHP 4.0 Bug #2674: unset() does noet work inside function
| From: | gert at wins dot uva dot nl | Date: | Sat, 06 Nov 1999 00:20:24 +0000 |
| Subject: | PHP 4.0 Bug #2674: unset() does noet work inside function | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-12154@lists.php.net to get a copy of this message | ||
From: gert@wins.uva.nl
Operating system: Solaris 7 (x86 and SPARC) and Solaris 2.6 (SPARC)
PHP version: 4.0 Beta 2
PHP Bug Type: Scripting Engine problem
Bug description: unset() does noet work inside function
<?php
function bla()
{
global $xxxx;
unset($xxxx);
}
$xxxx = 1;
echo "xxxx = $xxxx<br>";
unset($xxxx);
echo "xxxx = $xxxx<br>";
$xxxx = 1;
bla();
echo "xxxx = $xxxx<br>";
exit();
?>
I would expect unset() to obliterate a variable in both cases above.
For some reason unset() doesn't do that when requested to unset
a variable declared global inside a function.
My config reads:
./configure \
--with-mysql=/opt/mysql \
--with-apache=../apache_1.3.9 \
--with-config-file-path=/home/www/WWW/httpd/conf \
--enable-track-vars \
--enable-thread-safety \
--with-system-regex
I don't think its relevant, but my mysql is version mysql-3.22.22.
The enable-thread-safety is not relevant (error shows with and without).