Re: [PHP] Re: strange stripos behavior

2007-07-24 Thread Richard Lynch
On Tue, July 24, 2007 8:30 pm, Robert Cummings wrote: > On Tue, 2007-07-24 at 20:03 -0500, Shawn McKenzie wrote: >> For another guru, I have a question. I just checked the returns of >> this >> func on php.net to check myself and I see: >> >> This function may return Boolean FALSE, but may also

Re: [PHP] Re: strange stripos behavior

2007-07-24 Thread Shawn McKenzie
Yes, I understand that, but it said that "this function" may return 0 or "". So I guess that is just a generic statement to illustrate the point. -Shawn Robert Cummings wrote: > On Tue, 2007-07-24 at 20:03 -0500, Shawn McKenzie wrote: >> For another guru, I have a question. I just checked the

Re: [PHP] Re: strange stripos behavior

2007-07-24 Thread Robert Cummings
On Tue, 2007-07-24 at 20:03 -0500, Shawn McKenzie wrote: > For another guru, I have a question. I just checked the returns of this > func on php.net to check myself and I see: > > This function may return Boolean FALSE, but may also return a > non-Boolean value which evaluates to FALSE, such as 0

Re: [PHP] Re: strange stripos behavior

2007-07-24 Thread Shawn McKenzie
For another guru, I have a question. I just checked the returns of this func on php.net to check myself and I see: This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE, such as 0 or "". When would stripos() return "" ? Thanks! -Shawn Bruce Co

Re: [PHP] Re: strange stripos behavior

2007-07-24 Thread Shawn McKenzie
OK, so I've had at least 2 more beers since the last reply, but I'll give a shot. I don't know what text is in your message, but here's my logic, so it would depend upon what was concatenated first: Your statement read: if (not) stripos($searchtext, ''), which means false, '' or 0 (which it