function BrickMathCalculator::fromBase
Overrides CalculatorInterface::fromBase
1 call to BrickMathCalculator::fromBase()
- BrickMathCalculator::toInteger in vendor/
ramsey/ uuid/ src/ Math/ BrickMathCalculator.php - Converts a Hexadecimal instance to an Integer instance
File
-
vendor/
ramsey/ uuid/ src/ Math/ BrickMathCalculator.php, line 101
Class
- BrickMathCalculator
- A calculator using the brick/math library for arbitrary-precision arithmetic
Namespace
Ramsey\Uuid\MathCode
public function fromBase(string $value, int $base) : IntegerObject {
try {
return new IntegerObject((string) BigInteger::fromBase($value, $base));
} catch (MathException|\InvalidArgumentException $exception) {
throw new InvalidArgumentException($exception->getMessage(), (int) $exception->getCode(), $exception);
}
}