On Fri, 4 May 2001, Zeev Suraski wrote:

> At 17:30 4/5/2001, Joe Brown wrote:
> >Question:
> >Is is_null() an alias for isset()?
> >
> >Based on this statement and my understanding of both funcitons, it should
> >be.
>
> No it's not, it's a function.  As such, it cannot detect whether a variable
> exists and has a null value, or is undefined completely.
>

It can if you use it like I have been:

function whatever()
{
        $var = NULL;

        if (is_null($var)) {
                echo "variable is null";
        }
}

I'm a bit crazy, so I pre-assign a lot of my variables at the top of my
functions (I never could really get used to not pre-declaring
variables)...

-Sterling


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