|
Collator::getSortKeycollator_get_sort_keyGet sorting key for a string DescriptionObject-oriented style
public stringfalse Collator::getSortKey(string
$string )Procedural style stringfalse collator_get_sort_key(Collator
$object , string $string )Return collation key for a string. Collation keys can be compared directly instead of strings, though are implementation specific and may change between ICU library versions. Sort keys are generally only useful in databases or other circumstances where function calls are extremely expensive. Parameters
Return ValuesReturns the collation key for the string, or Warning
This function may
return Boolean Examples
Example #1 collator_get_sort_key example
The above example will output something similar to: 3832404046010901dc08
Example #2 Collator::getSortKey example with usort
The above example will output something similar to: array(3) { [0] => array(2) { 'name' => string(25) "🇳🇱 Derick Rethans" 'linked_account' => string(33) "https://phpc.social/users/derickr" } [1] => array(2) { 'name' => string(9) "Elephpant" 'linked_account' => string(24) "https://phpc.social/phpc" } [2] => array(2) { 'name' => string(25) "🇫🇷 Marcus Bointon" 'linked_account' => string(33) "https://phpc.social/users/Synchro" } } See Also
|