public static function isFunctionEnabled($function, $extension = null)
    {
        return
            (null === $extension || extension_loaded($extension))
            && !static::isFunctionBlacklistedInPhpIni($function)
            && !static::isFunctionBlacklistedInSuhosin($function)
            && static::isFunctionDefined($function);
    }