PHP | Ds\Map ksorted() Function
The Ds\Map::ksorted() function is an inbuilt function in PHP, which is used to returns a copy which is sorted by key. Syntax: Ds\Map public Ds\Map::ksorted ([ callable $comparator ] ) Parameter: This function accepts single parameter $comparator which contains function according to which the values