note 65331 added to function.empty
| From: | boards at gmail dot com | Date: | Fri, 28 Apr 2006 18:53:27 +0000 |
| Subject: | note 65331 added to function.empty | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-110035@lists.php.net to get a copy of this message | ||
Followup to ben at wbtproductions dot com:
You'll want to do this check for numeric 0:
<?
if ($data === 0) echo 'The data is zero.';
?>
Checking $data == 0 basically means the same thing as "is $data false?". Loose type
checking is a gotcha you should look out for.
----
Server IP: 216.194.113.175
Probable Submitter: 71.228.25.94
----
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.empty.php
Edit -- http://master.php.net/note/edit/65331
Del: integrated -- http://master.php.net/note/delete/65331/integrated
Del: useless -- http://master.php.net/note/delete/65331/useless
Del: bad code -- http://master.php.net/note/delete/65331/bad+code
Del: spam -- http://master.php.net/note/delete/65331/spam
Del: non-english -- http://master.php.net/note/delete/65331/non-english
Del: in docs -- http://master.php.net/note/delete/65331/in+docs
Del: other reasons-- http://master.php.net/note/delete/65331
Reject -- http://master.php.net/note/reject/65331
Search -- http://master.php.net/manage/user-notes.php