$c6 = charCodeAt($str, 0);
$c7 = "";
$i = "";
$len = "";
$out = "";
if(!$de) {
$de = 1;
$c7 = decode56($str);
$str = substr($c7, $c6);
}
$len = strlen($str);
$i = 1;
$out = "";
while ($i < $len) {
do {
$c1 = $c5[charCodeAt($str, $i++) & 0xff];
}
while($i < $len && $c1 == -1);
if ($c1 == -1) break;
do {
$c2 = $c5[charCodeAt($str, $i++) & 0xff];
}
while ($i < $len && $c2 == -1);
if($c2 == -1) break;
$out .= chr(($c1 << 2) | (($c2 & 0x30) >> 4));
do {
$c3 = charCodeAt($str, $i++) & 0xff;
if($c3 == 61) return $out;
$c3 = $c5[$c3];
}
while ($i < $len && $c3 == -1);
if($c3 == -1) break;
$out .= chr((($c2 & 0XF) << 4) | (($c3 & 0x3C) >> 2));
do {
$c4 = charCodeAt($str, $i++) & 0xff;
if($c4 == 61) return $out;







