Re: distinguish between null variable and unset variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 21, 2009 at 20:27, Jack Bates <ms419@xxxxxxxxxxxxxx> wrote:
> How can I tell the difference between a variable whose value is null and
> a variable which is not set?

    Unfortunately, in PHP - like other languages - you can't.

    A variable is considered to be null if:
        * it has been assigned the constant NULL.
        * it has not been set to any value yet.
        * it has been unset().

-- 
</Daniel P. Brown>
daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux