note 59407 added to function.strchr
| From: | Tarin at osu1 dot php dot net | Date: | Tue, 06 Dec 2005 07:53:06 +0000 |
| Subject: | note 59407 added to function.strchr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99624@lists.php.net to get a copy of this message | ||
I'm afraid John's note also isn't entirely true.
While, when $needle is a single character, strstr produces the same result as strchr, but when
$needle contains a string (i.e. multiple characters), strstr will search for the entire string,
where strchr will only use the first character of the string.
Now the names of the functions kind of make sense, too ;).
----
Manual Page -- http://www.php.net/manual/en/function.strchr.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59407
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59407&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59407&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59407&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59407&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59407&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59407&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59407&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59407&report=yes
Search -- http://master.php.net/manage/user-notes.php