note 23473 added to function.strpos
| From: | schofiel at cs dot ualberta dot ca | Date: | Fri, 19 Jul 2002 04:46:00 +0000 |
| Subject: | note 23473 added to function.strpos | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33288@lists.php.net to get a copy of this message | ||
Only 0 is false in PHP non-zero is postive
so -2 could be a true.
Since they can't use zero becuase it is in
the range of possible correct positions within
a string.
So do the type check against false explicity
to prevent odd behavior
--
http://www.php.net/manual/en/function.strpos.php
http://master.php.net/manage/user-notes.php?action=edit+23473
http://master.php.net/manage/user-notes.php?action=delete+23473
http://master.php.net/manage/user-notes.php?action=reject+23473