php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #29525 substr_compare documentation paramer sensitivity should be insensitivity?
Submitted: 2004-08-04 16:32 UTC Modified: 2004-08-04 16:56 UTC
From: echion at joshua dot haninge dot kth dot se Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.0.0 OS: Linux
Private report: No CVE-ID: None
 [2004-08-04 16:32 UTC] 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."


Reproduce code:
---------------
print substr_compare("abc", "ABC", 0, 3, TRUE);
print substr_compare("abc", "ABC", 0, 3, FALSE);

Expected result:
----------------
1
0

Actual result:
--------------
0
1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-04 16:56 UTC] dave@php.net
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".
 [2020-02-07 06:11 UTC] phpdocbot@php.net
Automatic comment on behalf of dave
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=b54e1771fb98b963800e78e20ebc9cc92936ac6c
Log: - Fix #29525.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 10 20:01:33 2025 UTC