public static function encode($number)
    {
        if (!is_numeric($number)) {
            throw new \RuntimeException("Specified number '{$number}' is not numeric");
        }

        if (!$number) {
            return 0;
        }

        $response = array();
        while ($number) {
            $remainder = $number % 32;
            $number = (int) ($number/32);
            $response[] = static::$symbols[$remainder];
        }

        return implode('', array_reverse($response));
    }
public static function encode($number)
    {
        if (!is_numeric($number)) {
            throw new \RuntimeException("Specified number '{$number}' is not numeric");
        }

        if (!$number) {
            return 0;
        }

        $response = array();
        while ($number) {
            $remainder = $number % 32;
            $number = (int) ($number/32);
            $response[] = static::$symbols[$remainder];
        }

        return implode('', array_reverse($response));
    }
public static function encode ( $ number ) { if ( ! is_numeric ( $ number ) ) { throw new \ RuntimeException ( "Specified number '{$number}' is not numeric" ) ; } if ( ! $ number ) { return 0 ; } $ response = array ( ) ; while ( $ number ) { $ remainder = $ number % 32 ; $ number = ( int ) ( $ number / 32 ) ; $ response [ ] = static :: $ symbols [ $ remainder ] ; } return implode ( '' , array_reverse ( $ response ) ) ; }
Encode a number

@param int $number

@return string

@throws \RuntimeException
Encode a number