Linux and UNIX Man Pages

Test Your Knowledge in Computers #468
Difficulty: Medium
Both Ethernet and IPv4 use an all-zeros broadcast address to indicate a broadcast packet.
True or False?
Linux & Unix Commands - Search Man Pages

strcmp(3) [php man page]

STRCMP(3)								 1								 STRCMP(3)

strcmp - Binary safe string comparison

SYNOPSIS
int strcmp (string $str1, string $str2) DESCRIPTION
Note that this comparison is case sensitive. PARAMETERS
o $str1 - The first string. o $str2 - The second string. RETURN VALUES
Returns < 0 if $str1 is less than $str2; > 0 if $str1 is greater than $str2, and 0 if they are equal. EXAMPLES
Example #1 strcmp(3) example <?php $var1 = "Hello"; $var2 = "hello"; if (strcmp($var1, $var2) !== 0) { echo '$var1 is not equal to $var2 in a case sensitive string comparison'; } ?> SEE ALSO
strcasecmp(3), preg_match(3), substr_compare(3), strncmp(3), strstr(3), substr(3). PHP Documentation Group STRCMP(3)

Check Out this Related Man Page

STRNATCASECMP(3)							 1							  STRNATCASECMP(3)

strnatcasecmp - Case insensitive string comparisons using a ";natural order" algorithm

SYNOPSIS
int strnatcasecmp (string $str1, string $str2) DESCRIPTION
This function implements a comparison algorithm that orders alphanumeric strings in the way a human being would. The behaviour of this function is similar to strnatcmp(3), except that the comparison is not case sensitive. For more information see: Martin Pool's Natural Order String Comparison page. PARAMETERS
o $str1 - The first string. o $str2 - The second string. RETURN VALUES
Similar to other string comparison functions, this one returns < 0 if $str1 is less than $str2 > 0 if $str1 is greater than $str2, and 0 if they are equal. SEE ALSO
preg_match(3), strcmp(3), strcasecmp(3), substr(3), stristr(3), strncasecmp(3), strncmp(3), strstr(3), setlocale(3). PHP Documentation Group STRNATCASECMP(3)

Featured Tech Videos