note 68826 added to function.is-null
| From: | powderz at gmail dot com | Date: | Sat, 12 Aug 2006 04:41:00 +0000 |
| Subject: | note 68826 added to function.is-null | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115819@lists.php.net to get a copy of this message | ||
Actually, since a wrapper is going to be written, you can check for your own version null
values...if you want to be creative for some reason.
<?php
function isnull($data)
{
/** only if you need this
if (is_string($data)) {
$data = strtolower($data);
}
*/
switch ($data) {
// Add whatever your definition of null is
// This is just an example
//-----------------------------
case 'unknown': // continue
case 'undefined': // continue
//-----------------------------
case 'null': // continue
case 'NULL': // continue
case NULL:
return true;
}
// return false by default
return false;
}
?>
----
Server IP: 216.194.113.175
Probable Submitter: 67.10.71.245
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.is-null.php
Edit -- https://master.php.net/note/edit/68826
Del: integrated -- https://master.php.net/note/delete/68826/integrated
Del: useless -- https://master.php.net/note/delete/68826/useless
Del: bad code -- https://master.php.net/note/delete/68826/bad+code
Del: spam -- https://master.php.net/note/delete/68826/spam
Del: non-english -- https://master.php.net/note/delete/68826/non-english
Del: in docs -- https://master.php.net/note/delete/68826/in+docs
Del: other reasons-- https://master.php.net/note/delete/68826
Reject -- https://master.php.net/note/reject/68826
Search -- https://master.php.net/manage/user-notes.php