original_string: public static function functionExists($function)
      {
          // eval() is a language construct
          if ($function == 'eval') {
              // does not check suhosin.executor.eval.whitelist (or blacklist)
              if (extension_loaded('suhosin')) {
                  return @ini_get("suhosin.executor.disable_eval") != "1";
              }
              return true;
          }
  
          $exists = function_exists($function);
  
          if (extension_loaded('suhosin')) {
              $blacklist = @ini_get("suhosin.executor.func.blacklist");
              if (!empty($blacklist)) {
                  $blacklistFunctions = array_map('strtolower', array_map('trim', explode(',', $blacklist)));
                  return $exists && !in_array($function, $blacklistFunctions);
              }
          }
  
          return $exists;
      }
code: public static function functionExists($function)
      {
          // eval() is a language construct
          if ($function == 'eval') {
              // does not check suhosin.executor.eval.whitelist (or blacklist)
              if (extension_loaded('suhosin')) {
                  return @ini_get("suhosin.executor.disable_eval") != "1";
              }
              return true;
          }
  
          $exists = function_exists($function);
  
          if (extension_loaded('suhosin')) {
              $blacklist = @ini_get("suhosin.executor.func.blacklist");
              if (!empty($blacklist)) {
                  $blacklistFunctions = array_map('strtolower', array_map('trim', explode(',', $blacklist)));
                  return $exists && !in_array($function, $blacklistFunctions);
              }
          }
  
          return $exists;
      }
code_tokens: public static function functionExists ( $ function ) { // eval() is a language construct if ( $ function == 'eval' ) { // does not check suhosin.executor.eval.whitelist (or blacklist) if ( extension_loaded ( 'suhosin' ) ) { return @ ini_get ( "suhosin.executor.disable_eval" ) != "1" ; } return true ; } $ exists = function_exists ( $ function ) ; if ( extension_loaded ( 'suhosin' ) ) { $ blacklist = @ ini_get ( "suhosin.executor.func.blacklist" ) ; if ( ! empty ( $ blacklist ) ) { $ blacklistFunctions = array_map ( 'strtolower' , array_map ( 'trim' , explode ( ',' , $ blacklist ) ) ) ; return $ exists && ! in_array ( $ function , $ blacklistFunctions ) ; } } return $ exists ; }
docstring: Tests if a function exists. Also handles the case where a function is disabled via Suhosin.
  
  @param string $function
  @return bool
docstring_tokens: Tests if a function exists . Also handles the case where a function is disabled via Suhosin .