PHP's sort functions sort your array in place, and they also return a value, but since PHP 5.6 that value has always been true. This RFC from Gina Peter Banyard would have made them return the sorted array instead.
Why change it
A return value that's always true tells you nothing, and it gets in the way when you write code in a functional style. You can't pass sort straight to something like array_map(). Instead, you have to wrap it in a closure that sorts the array and then returns it.
What would change
These functions would return a copy of the sorted, walked or shuffled array instead of true:
sort(),rsort(),asort(),arsort(),ksort(),krsort()natsort(),natcasesort()usort(),uasort(),uksort()array_multisort()shuffle()array_walk(),array_walk_recursive()
The functions would still take the array by reference and sort it in place, so only the return value changes. The RFC says returning the copy costs almost nothing, because PHP only increments the array's reference count instead of duplicating the data.
The sort methods on SPL's ArrayObject wouldn't change.
What it means for existing code
There's one catch. If you sort an empty array and check the return value, you'd get an empty array back. An empty array is falsy, so a check like if (sort($arr)) would fail where it passes today.
Where it stands
The author withdrew it. The RFC is dated October 20, 2024, and targeted PHP 8.5. It never went to a vote, and the vote section still has placeholder dates.