Re: note 10431
| From: | Zak Greant | Date: | Wed, 03 Jan 2001 16:04:33 +0000 |
| Subject: | Re: note 10431 | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-9340@lists.php.net to get a copy of this message | ||
icebrkr@cyberdyne.org wrote:
> Wouldn't it be more 'standard' to just make strpos() return -1 if needle
> isn't found in haystack? Instead of this non-standard !== or === stuff?
If PHP were C, then having strpos return -1 if needle could not be
found would make more sense - however, PHP is not C. Most PHP
functions return a boolean false value in cases like this, hence the
need for the typed comparison operators.
--zak