public static function decodeToInteger($string)
    {
        $stringLength = strlen($string);

        $baseLength = strlen(static::$chars);

        $id = 0;

        for($i = 0; $i < $stringLength; $i++){

            $pos = strpos(static::$chars, $string[$i]);

            $id = ($id * $baseLength) + $pos;

        }

        return $id;
    }
public static function decodeToInteger($string)
    {
        $stringLength = strlen($string);

        $baseLength = strlen(static::$chars);

        $id = 0;

        for($i = 0; $i < $stringLength; $i++){

            $pos = strpos(static::$chars, $string[$i]);

            $id = ($id * $baseLength) + $pos;

        }

        return $id;
    }
public static function decodeToInteger ( $ string ) { $ stringLength = strlen ( $ string ) ; $ baseLength = strlen ( static :: $ chars ) ; $ id = 0 ; for ( $ i = 0 ; $ i < $ stringLength ; $ i ++ ) { $ pos = strpos ( static :: $ chars , $ string [ $ i ] ) ; $ id = ( $ id * $ baseLength ) + $ pos ; } return $ id ; }
Decode the encoded string to Integer

@param $string
@return mixed
Decode the encoded string to Integer