|
Ds\Set::sortSorts the set in-place Description
public void Ds\Set::sort(callable
$comparator = ?)
Sorts the set in-place, using an optional Parameters
Return ValuesNo value is returned. ExamplesExample #1 Ds\Set::sort example The above example will output something similar to:
Ds\Set Object
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => 5
)
Example #2 Ds\Set::sort example using a comparator The above example will output something similar to:
Ds\Set Object
(
[0] => 5
[1] => 4
[2] => 3
[3] => 2
[4] => 1
)
|