Which of the following functions can be used to sort an array by its keys in descending order?
krsort
Correct:
krsort
D is correct.The sort() and rsort() functions operate on values, whereas ksort() sorts in ascending order and reverse_sort() is not a PHP function.