php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #52036 Small mistake on your web site
Submitted: 2010-06-09 20:32 UTC Modified: 2010-06-10 05:03 UTC
From: wu-one at mail dot ru Assigned:
Status: Wont fix Package: Unknown/Other Function
PHP Version: 5.3.2 OS: Windows
Private report: No CVE-ID: None
 [2010-06-09 20:32 UTC] wu-one at mail dot ru
Description:
------------
Just wanted to let you know that on your web site its writing about "strcmp":
Returns < 0 if str1 is less than str2; > 0 if str1  is greater than str2, and 0 if they are equal. 
I think it should be:
Returns "-1" if str1 is less than str2; "1" if str1  is greater than str2, and "0" if they are equal. 
Thank you.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-10 05:03 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2010-06-10 05:03 UTC] aharvey@php.net
The C standard only guarantees that the C strcmp() function (which underlies the PHP function) returns "an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string pointed to by s2". While most implementations do return +1, 0 and -1 as the return values, we can't assume that's the case on all platforms.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 07:01:28 2025 UTC