public static function fromBase($number, $base)
    {
        // trim base 64 padding char, only positive
        $number = trim($number, ' =-');
        if ($number === '' || strpos($number, '.') !== false) {
            throw new \InvalidArgumentException('Argument number is not an integer');
        }

        $baseChar = static::getBaseChar($base);
        if (trim($number, $baseChar[0]) === '') {
            return new static('0');
        }

        if (static::$gmpSupport && $base <= 62) {
            return new static(static::baseConvert($number, $base, 10));
        }

        // By now we know we have a correct base and number
        return new static(static::bcDec2Base($number, $base, $baseChar));
    }