note 102024 deleted from function.strpos by danbrown
| From: | danbrown@php.net | Date: | Mon, 24 Jan 2011 14:04:14 +0000 |
| Subject: | note 102024 deleted from function.strpos by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-176240@lists.php.net to get a copy of this message | ||
Note Submitter: robinwilson16
----
Example 2 issue:
Example 2 gives a value of false if the needle is found at position zero within the haystack.
i.e.:
$pos = strpos('str1, str2', 'str1');
if($pos !== false) {
// This would give an answer of zero and so would evaluate to false which in this case would be
incorrect
}