Bitpay\Math\Math::__callStatic PHP Method

__callStatic() public static method

public static __callStatic ( $name, $arguments )
    public static function __callStatic($name, $arguments)
    {
        if (is_null(static::$engine)) {
            if (extension_loaded('gmp')) {
                static::$engine = new GmpEngine();
                static::$engineName = "GMP";
            } elseif (extension_loaded('bcmath')) {
                static::$engine = new BcEngine();
                static::$engineName = "BCMATH";
            } else {
                throw new \Exception('The GMP or BCMATH extension for PHP is required.');
            }
        }
        return call_user_func_array(array(static::$engine, $name), $arguments);
    }