Hex decoder will clean up the \x crap, which helps, but to decode the rest you need to actually run it in PHP, because it's designed to decode itself. If you carefully pull apart the statements in there and run them one-by-one, and take care never to run an 'eval' or anything like that (replace 'eval' with 'print' to see what they were running, then decide if that's safe to run).
I don't recommend doing so unless you have some knowledge of PHP and a throwaway workstation that's off the network which you can wipe afterwards. And it's an ambitious enough project that I wouldn't bother; you don't need to do all that to know it's malcode.
If you're just curious, then that's different. Have fun. But decoding it is a straightforward programming exercise, and you might get better help on other stacks.