note 89732 deleted from function.strpos by danbrown
| From: | danbrown@php.net | Date: | Fri, 20 Mar 2009 19:43:10 +0000 |
| Subject: | note 89732 deleted from function.strpos by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152225@lists.php.net to get a copy of this message | ||
Note Submitter: andrasz at gmail dot com
----
@jburns131
I think casting is useless in that case, because 0 has *not* the same type as null.
So the following code does the job :
if($needlePos === 0) {
echo "db is in position zero";
} else {
echo "db is NOT in position zero";
}