Re: odd behavior of stripos() with === operator
| From: | Michael | Date: | Fri, 17 Nov 2006 07:44:08 +0000 |
| Subject: | Re: odd behavior of stripos() with === operator | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-244773@lists.php.net to get a copy of this message | ||
At 12:29 AM 11/17/2006 , you wrote:
>> I have underlined the output I am interested in...
>
>You did??? Where?
>
Ok, my bad, I sent the mail as plain text instead of styled :P
oops
>> How can the variable $found be both TRUE and FALSE at the same time?
>
>None of your output above indicates that it is both equal to TRUE and
>FALSE at the same time. It does indicate that $found does NOT equal TRUE
>and does NOT equal FALSE at the same time and that is because it
>returned the integer value 0 which is the location of the string in the
>haystack.
>
Ok, picking gnits...
I should have said NOT true and NOT false at the same time.
As for the return of the integer 0..
The documentation indicates that the === and !== operators take this into account in fact there is a
specific example in the manual.
My point here is that if !== works , why does === not?
thanks for responding.
>Cheers,
>Rob.
>--
>.------------------------------------------------------------.
>| InterJinn Application Framework - http://www.interjinn.com |
>:------------------------------------------------------------:
>| An application and templating framework for PHP. Boasting |
>| a powerful, scalable system for accessing system services |
>| such as forms, properties, sessions, and caches. InterJinn |
>| also provides an extremely flexible architecture for |
>| creating re-usable components quickly and easily. |
>`------------------------------------------------------------'
>