Ford, Mike [LSS] wrote:

Actually, I'd regard this as a bug in the function, not the
> documentation.  It makes much more sense as a "case_sensitivity"
> parameter -- if it's "case_insensitivity", you have to negate a
> negative to request a positive, which is very obscure and liable
> to silly errors.  If the default value for this parameter were
> TRUE, it would still be "optionally case-insensitive" by
> specifying FALSE.


Most of the original PHP functions were case-sensitive. The -i- variants (stripos, stristr, eregi, etc.) came as an afterthought, so this function somewhat follows that rationale.


Reversing the parameter now would break backwards compatibility (this function made it into both PHP 4.3.7+ and PHP 5.0.0), however, I've forwarded this onto the creator of the function, Ilia, for his input.

Cheers!

Mike

Dave

Reply via email to