null, adjective: having no value

IMHO, isset() should be left as is.  Either way if you are looking for a
null value you will have to use '== NULL' or is_null().

if (isset($a) && is_null($a))

if (isset($a))
    if (is_null($a))

etc...

The only possible situation I can think(right now) of where this might be
useful is if you do not care that the value is null and null is a perfectly
legal value(or non-value).  In which case, all you are accomplishing is
breaking everyone else's script who does not allow null values because they
rely on isset() returning false and not letting these by.

Chris

-----Original Message-----
From: Martin Jansen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 06, 2001 2:19 PM
To: Andrei Zmievski; Bjoern Hoehrmann
Cc: PHP Development Mailing List
Subject: Re: [PHP-DEV] wrong implementation of isset()?


On Tue, 6 Feb 2001 13:43:29 -0600, Andrei Zmievski wrote:
>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.

But if I declare the variable in my script (and in the namespace),
it's existing, no matter which value it has (String, Integer, NULL
or whatever). As a result of that, isset() should return true.

-Martin


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to