PHP string function strncasecmp

The String function strncasecmp() is used to do a case insensitive string comparison.

Syntax

Parameter Description
mystr1 This is a required parameter which defines the first string to compare.
mystr2 This is a required parameter which defines the second string to compare.
len  This is a required parameter which defines the lenght of the string used to compare the two strings.

Return Value

This function will return < 0 if the mystr1 is less than mystr2; > 0 if mystr1 is greater than mystr2, and zero (0) if they are equal.

Example

Example 2