RE: [PHP-DEV] wrong implementation of isset()?
| From: | Marten Gustafsson | Date: | Tue, 06 Feb 2001 20:19:55 +0000 |
| Subject: | RE: [PHP-DEV] wrong implementation of isset()? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-45871@lists.php.net to get a copy of this message | ||
I have always (although I know this wasn?t the case prior to PHP 4) thought
that unset() removed the variable from memory. Clearly this can?t be the
case if it has a value of NULL.
But if this is the way things work then is_null() ought to be an alias of
isset().
-Marten.
Icq# 38863127
-----Original Message-----
From: Andrei Zmievski [mailto:andrei@ispi.net]
Sent: Tuesday, February 06, 2001 8:43 PM
To: Bjoern Hoehrmann
Cc: Martin Jansen; PHP Development Mailing List
Subject: Re: [PHP-DEV] wrong implementation of isset()?
On Tue, 06 Feb 2001, Bjoern Hoehrmann wrote:
> >NULL == not set
>
> Great analysis. What about answering the question? Stanislav Malyshev
> said some months ago this is 'strange', see the discussion around bug
> 6076. Tell us at least, why this actually isn't strange.
By default, any unset variable has value NULL - and isset(NULL) returns
false to indicate that. Similarly, assigning NULL to a variable unsets
it.
-Andrei
* The great thing about standards is that there are so many to choose from.
*
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
For additional commands, e-mail: php-dev-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net