public static function hasExtensionSupport( $extension, $version = null )
    {
        if ( is_null( $version ) )
        {
            return extension_loaded( $extension );
        }
        return extension_loaded( $extension ) && version_compare( phpversion( $extension ), $version, ">=" ) ;
    }
public static function hasExtensionSupport( $extension, $version = null )
    {
        if ( is_null( $version ) )
        {
            return extension_loaded( $extension );
        }
        return extension_loaded( $extension ) && version_compare( phpversion( $extension ), $version, ">=" ) ;
    }
public static function hasExtensionSupport ( $ extension , $ version = null ) { if ( is_null ( $ version ) ) { return extension_loaded ( $ extension ) ; } return extension_loaded ( $ extension ) && version_compare ( phpversion ( $ extension ) , $ version , ">=" ) ; }
Determines if the specified extension is loaded.

If $version is specified, the specified extension will be tested also
against the version of the loaded extension.

Examples:
<code>
hasExtensionSupport( 'gzip' );
</code>
will return true if gzip extension is loaded.

<code>
hasExtensionSupport( 'pdo_mysql', '1.0.2' );
</code>
will return true if pdo_mysql extension is loaded and its version is at least 1.0.2.

@param string $extension
@param string $version
@return bool
Determines if the specified extension is loaded .