public function decode($str) {

		$str = strtoupper($str);

		$l = strlen($str);
		$n = 0;
		$b = 0;

		$decoded = null;

		for ($i = 0; $i < $l; $i++) {
			$n = $n << 5;
			$n = $n + $this->decodeTable[$str[$i]];
			$b = $b + 5;

			if ($b >= 8) {
				$b = $b - 8;
				$decoded .= chr(($n & (0xFF << $b)) >> $b);
			}
		}

		return $decoded;
	}
public function decode($str) {

		$str = strtoupper($str);

		$l = strlen($str);
		$n = 0;
		$b = 0;

		$decoded = null;

		for ($i = 0; $i < $l; $i++) {
			$n = $n << 5;
			$n = $n + $this->decodeTable[$str[$i]];
			$b = $b + 5;

			if ($b >= 8) {
				$b = $b - 8;
				$decoded .= chr(($n & (0xFF << $b)) >> $b);
			}
		}

		return $decoded;
	}
public function decode ( $ str ) { $ str = strtoupper ( $ str ) ; $ l = strlen ( $ str ) ; $ n = 0 ; $ b = 0 ; $ decoded = null ; for ( $ i = 0 ; $ i < $ l ; $ i ++ ) { $ n = $ n << 5 ; $ n = $ n + $ this -> decodeTable [ $ str [ $ i ] ] ; $ b = $ b + 5 ; if ( $ b >= 8 ) { $ b = $ b - 8 ; $ decoded .= chr ( ( $ n & ( 0xFF << $ b ) ) >> $ b ) ; } } return $ decoded ; }
Decode a Base32 encoded string.

@param string $str
Base 32 encoded string.

@return string
Decode a Base32 encoded string .