"Mark J. Hershenson" wrote:
> >> 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. *
> Well, sure, isset(NULL) should return false, it's not a variable set in the
> scope. A constant(?) yes, but not a variable.
> 
> But if you set a variable at some point in a script, would it not stand to
> reason that that name is in the global/local namespace, and therefore IS
> set?

Perhaps, in order to maintain compatibility, we should re-document is_set,
create the documentation for is_null, and look into creating a new function
that will determine if something has "ever been inside the namespace", regardless
of its current value, or absence of value.

Right now, the *documentation* for isset does imply that:
$a = NULL;
isset($a); //TRUE
when this is not the case. 

Specifically, the documentation says "Returns true if a variable exists"
rather than "Returns true if a variable exists, but has not been sunsequently
assigned a value (or non-value) of NULL, and has not been unset().

-Ronabop

--
Personal:  [EMAIL PROTECTED], 520-326-6109, http://www.opus1.com/ron/
Work: [EMAIL PROTECTED], 520-546-8993, http://www.pnsinc.com/
The opinions expressed in this email are not neccesarrily those of myself,
my  employers, or any of the other little voices in my head.

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