There's no "command" that can do this. If you tell PHP to modify an array, and store the newly modified array in the same variable that held the old array, then it will do just that - it won't save the old version of the array so you can revert back to it.
If you really have a need to keep the unsorted array as well as the sorted one, just store the two arrays in different variables instead of overwriting the original.