Oh dear, looks like your server got hacked. The code will decode and execute itself when run, it's obfuscated to obscure its function.
It's self-decoding. You can see the
eval() in there. If you change it to a
print() then it will display the code that it's trying to execute. This is nested several deeps, so each time you will need to change an
eval() to a
print() to see what's going on. Be very careful when doing this, every time you see a construct like
$a($b) then it's doing a function call, so you'll need to stop it from doing the function call and just print out