RE: Brain Death - [PHP] functions classes

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

 



At 4:51 PM +0100 8/26/06, Alex Turner wrote:
And to be very pedantic - as null does not have a type then actually 'x === null' should evaluate to absurdity, but PHP is more pragmatic than that ;-)

That's a very good point.

While one NULL variable in php can be compared to another NULL variable and produce true, it's not so in MySQL.

In MySQL NULL does not equal NULL -- such comparisons produces NULL and not true. Instead you have to use IS_NULL or NOT NULL to check for NULL.

So, it's probably best to get into the habit of using is_null.

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

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