Re: odd behavior of stripos() with === operator *LAST POST*
| From: | Robert Cummings | Date: | Fri, 17 Nov 2006 16:32:34 +0000 |
| Subject: | Re: odd behavior of stripos() with === operator *LAST POST* | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244812@lists.php.net to get a copy of this message | ||
On Fri, 2006-11-17 at 17:29 +0100, Jochem Maas wrote:
> Robert Cummings wrote:
> > On Fri, 2006-11-17 at 02:54 -0700, Michael wrote:
> >> This will be my last post on this thread of discussion.
> >>
> >> Thanks to all who replied, I have it figured out.
> >>
> >> I guess my only problem with the way the !== and === operators work in this situation
> >> is this:
> >>
> >> Logic dictates that if something evaluates to NOT FALSE it must be TRUE.
> >> Regardless of the type, regardless of the species, breed, flavor etc.
> >
> > Sure logic dictates that if a return type is confined to the boolean set
> > then if it is not false it must be true; however, strpos() may return a
> > value from the set of booleans or a value from the set of integers. As
>
>
> liar liar pants on fire. just to confuse matters (the OP deserves it given the length of the
> thread):
> strpos() may return a boolean false or a value from the set of integers - it will never
> ever return true (unless you hack the php source)
Where's my baseball bat... ;) Aaaaaaaaaaaaaaaaanyways, if you re-read
the above I wrote "strpos() may return a value from the set of booleans
or a value from the set of integers" I didn't say WHICH value it would
return from the set of booleans *PTTHTHTHTHTTHTT* *nyah nyah* :D
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. |
`------------------------------------------------------------'