src/Koldy/Convert/NumericNotation.php
public static function dec2big(string $number): string
    {
    	static::checkExtensionOrFail();

        $alphabet = static::NUMBERS;
        $number = trim((string)$number);

        if (strlen($number) == 0) {
            throw new Exception('Got empty number for dec2big, can not proceed');
        }

        $mod = (string)count($alphabet);
        $s = '';

        do {
            $x = bcdiv($number, $mod, 0);
            $left = bcmod($number, $mod);
            $char = $alphabet[$left];
            $s = $char . $s;

            $number = $x;
        } while ($x != '0');

        return $s;
    }
public static function dec2big(string $number): string
    {
    	static::checkExtensionOrFail();

        $alphabet = static::NUMBERS;
        $number = trim((string)$number);

        if (strlen($number) == 0) {
            throw new Exception('Got empty number for dec2big, can not proceed');
        }

        $mod = (string)count($alphabet);
        $s = '';

        do {
            $x = bcdiv($number, $mod, 0);
            $left = bcmod($number, $mod);
            $char = $alphabet[$left];
            $s = $char . $s;

            $number = $x;
        } while ($x != '0');

        return $s;
    }
public static function dec2big ( string $ number ) : string { static :: checkExtensionOrFail ( ) ; $ alphabet = static :: NUMBERS ; $ number = trim ( ( string ) $ number ) ; if ( strlen ( $ number ) == 0 ) { throw new Exception ( 'Got empty number for dec2big, can not proceed' ) ; } $ mod = ( string ) count ( $ alphabet ) ; $ s = '' ; do { $ x = bcdiv ( $ number , $ mod , 0 ) ; $ left = bcmod ( $ number , $ mod ) ; $ char = $ alphabet [ $ left ] ; $ s = $ char . $ s ; $ number = $ x ; } while ( $ x != '0' ) ; return $ s ; }
Convert decimal number into your numeric system

@param string $number

@return string
@throws Exception
@throws ExtensionException
@example 40487 is ax1
Convert decimal number into your numeric system