note 1526 deleted from function.strpos by jimw
| From: | jimw@php.net | Date: | Thu, 18 Oct 2001 21:24:35 +0000 |
| Subject: | note 1526 deleted from function.strpos by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19119@lists.php.net to get a copy of this message | ||
Its worth mentioning that
if (strpos($hay,$needle)>="0") { ... } works just fine too. Since == just tests for the
first character and its better to use
if (substr($hay,1,0)==$needle) { ... } when just checking for the first character since it will be
faster to just compare the first character rather than search the whole substring.