function _openid_get_math_library
Determine the available math library GMP vs. BCMath, favouring GMP for performance.
8 calls to _openid_get_math_library()
- openid_begin in modules/
openid/ openid.module - The initial step of OpenID authentication responsible for the following:
- _openid_math_add in modules/
openid/ openid.inc - Calls the add function from the available math library for OpenID.
- _openid_math_cmp in modules/
openid/ openid.inc - Calls the cmp function from the available math library for OpenID.
- _openid_math_div in modules/
openid/ openid.inc - Calls the div function from the available math library for OpenID.
- _openid_math_mod in modules/
openid/ openid.inc - Calls the mod function from the available math library for OpenID.
File
-
modules/
openid/ openid.inc, line 720
Code
function _openid_get_math_library() {
// Not drupal_static(), because a function is not going to disappear and
// change the output of this under any circumstances.
static $library;
if (empty($library)) {
if (function_exists('gmp_add')) {
$library = 'gmp';
}
elseif (function_exists('bcadd')) {
$library = 'bcmath';
}
}
return $library;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.