OpenID in PHP

Xageroth Sekarius xageroth at
Thu Jun 30 01:40:26 PDT 2005

> Regarding the BigInt class, I've pulled that out for now. It'll calculate
> keys and the shared secret correctly but the performance is less than
> desireable so it's back to needing BCMath for now.

Is BCMath better than BigInt? I was under the impression it wasn't. As
for compatibility, BCMath would be better anyway, claims to be bundled
with PHP 4.0.4 onward. The most desirable option would be using
whatever is available in order of efficiency such as:

if (extension_loaded('gmp') || @dl('gmp.' . PHP_SHLIB_SUFFIX) ||
@dl('php_gmp.' . PHP_SHLIB_SUFFIX)) {
    // GMP loaded.

} else if (extension_loaded('big_int') || @dl('big_int.' .
PHP_SHLIB_SUFFIX) || @dl('php_big_int.' . PHP_SHLIB_SUFFIX)) {
    // BigInt loaded.

} else if (extension_loaded('bcmath') || @dl('bcmath.' .
PHP_SHLIB_SUFFIX) || @dl('php_bcmath.' . PHP_SHLIB_SUFFIX)) {
    // BCMath loaded.

} else {
    // um.. no more options?
    echo "You're screwed, bub.";

but that could be a lot of work for not much gain. *shrug*

More information about the yadis mailing list