note 52156 deleted from function.strstr by betz
| From: | betz@php.net | Date: | Fri, 22 Apr 2005 14:12:53 +0000 |
| Subject: | note 52156 deleted from function.strstr by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-88406@lists.php.net to get a copy of this message | ||
Note Submitter: sharris at mobius dot com
Reason: useless
----
Regarding the note left by nicolas at bougues dot net on 26-Sep-2002 11:53, where he stated
> The following expression
>
> strstr ("0", "0") == FALSE
>
> is TRUE, which is obviously not what one's want when comparing to FALSE.
>
> If you just want to know iff haystack contains needle, without such ambiguity, use is_string
> (strstr ("0", "0")), which will evaluate to TRUE.
Use the === operator instead. Thus,
str ("0", "0") === FALSE
if FALSE as expected.