Php strcoll
From w3cyberlearnings
Contents |
PHP function strcoll
This function compares two strings, and it is case sensitive and is not binary safe. This function is the same as strcmp().
Syntax strcoll
- string1: input 1
- string2: input 2
strcoll(string1, string2)
Return
- 0: when two string equal.
- >0: string1 is greater than string2.
- <0: string2 is greater than string1.
Example 1
<?php echo strcoll("Great Day","Great day"); ?>
Output: String2 is greater than String1
-1