|
Collator::comparecollator_compareCompare two Unicode strings DescriptionObject-oriented style
public intfalse Collator::compare(string
$string1, string $string2)Procedural style intfalse collator_compare(Collator
$object, string $string1, string $string2)Compare two Unicode strings according to collation rules. Parameters
Return ValuesReturn comparison result:
false on failure.
Warning
This function may
return Boolean Examples
Example #1 collator_compare example The above example will output: s1 is greater than s2
Example #2 Comparing strings without diacritics or case-sensitivity The above example will output: The same This example instructs the collator to compare with only taking the base characters into account. The documentation for Collator->setStrength explains the different strengths. See Also
|