RE: [PHP-DOC] #29525 [Opn->Csd]: substr_compare documentation par amer sensitivity should be insensitivity?

From: Date: Thu, 05 Aug 2004 10:33:29 +0000
Subject: RE: [PHP-DOC] #29525 [Opn->Csd]: substr_compare documentation par amer sensitivity should be insensitivity?
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969362697@lists.php.net to get a copy of this message
On 04 August 2004 15:56, dave@php.net wrote: > ID: 29525 > Updated by: dave@php.net > Reported By: echion at joshua dot haninge dot kth dot se > -Status: Open +Status: Closed > Bug Type: Documentation problem > Operating System: Linux > PHP Version: 5.0.0 > New Comment: > > This bug has been fixed in the documentation's XML sources. Since the > online and downloadable versions of the documentation need some time > to get updated, we would like to ask you to be a bit patient. > > Thank you for the report, and for helping us make our documentation > better. > > You're right, as the purpose of the function states, "... optionally > case insensitive". > > > Previous Comments: > -------------------------------------------------------------- > ---------- > > [2004-08-04 16:32:26] echion at joshua dot haninge dot kth dot se > > Description: > ------------ > The parameter case_sensitivity should probably be named > case_insensitivity in the documentation. > > "int substr_compare ( string main_str, string str, int offset [, int > length [, bool case_sensitivity]])" > > and > > "If case_sensitivity is TRUE, comparison is case sensitive." 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. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.doc (#969362697) next »