On this page
function _openid_get_math_library
_openid_get_math_library()
Determine the available math library GMP vs. BCMath, favouring GMP for performance.
File
- modules/openid/openid.inc, line 719
- OpenID utility functions.
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;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!openid!openid.inc/function/_openid_get_math_library/7.x