PHP中的反向函数

I Need Reverse Function in PHP for the Following JavaScript!

function jsrev(a) {
    return a.replace(/[a-zA-Z]/g, function(c) {
        return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26)
    })
}

The above function convert string:-

"ABCDEFGHIJKLMNOPQRSTUVWXYZ" to "NOPQRSTUVWXYZABCDEFGHIJKLM" in JavaScript

but i need function to reverse 2nd string to 1st in PHP.

I know I voted down and flagged to close this question but.

Code you provided performs ROT13 operation. ROT13 is its own inverse, if you apply ROT13 twice you will get original string.

ROT13( ROT13( x ) ) = x

There is built in function in PHP str_rot13, use it.