note 58288 added to tutorial.useful
| From: | gernot at geebee-online dot de | Date: | Sun, 30 Oct 2005 09:59:17 +0000 |
| Subject: | note 58288 added to tutorial.useful | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-97827@lists.php.net to get a copy of this message | ||
IMHO there's a problem with interpreting the result of strpos() as a boolean value:
According to the conversion rules for booleans
( http://www.php.net/manual/en/language.types.boolean.php
)
both evaluates to FALSE: an empty string and the string "0".
So if you searched for the substring "Mozilla" in the above example, the strpos() function
returned "0" which would be interpreted as FALSE.
----
Manual Page -- http://www.php.net/manual/en/tutorial.useful.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58288
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58288&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58288&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58288&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58288&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58288&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58288&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58288&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58288&report=yes
Search -- http://master.php.net/manage/user-notes.php