- assert: documentation ( source)
- strtr: documentation ( source)
<?php
function rotUrl($url) {
return strtr($url,
'./-:?=&%# ZQXJKVWPY abcdefghijklmnopqrstuvwxyz123456789ABCDEFGHILMNORSTU',
'ZQXJKVWPY ./-:?=&%# 123456789ABCDEFGHILMNORSTUabcdefghijklmnopqrstuvwxyz');
}
assert('http://google.com' === rotUrl(rotUrl('http://google.com')));