RE: [PHP] Brain Death - [PHP] functions classes
| From: | tedd | Date: | Sat, 26 Aug 2006 16:41:49 +0000 |
| Subject: | RE: [PHP] Brain Death - [PHP] functions classes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-241133@lists.php.net to get a copy of this message | ||
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