Checks if a function is available

@access private
@param  string  $func Function name
@return boolean Success
518158
function function_enabled($func) {
        // cache the list of disabled functions
        static $disabled = null;
        if ($disabled === null) $disabled = array_map('trim', array_map('strtolower', explode(',', ini_get('disable_functions'))));
        // cache the list of functions blacklisted by suhosin
        static $blacklist = null;
        if ($blacklist === null) $blacklist = extension_loaded('suhosin') ? array_map('trim', array_map('strtolower', explode(',', ini_get('  suhosin.executor.func.blacklist')))) : array();
        // checks if the function is really enabled
        return (function_exists($func) && !in_array($func, $disabled) && !in_array($func, $blacklist));
    }
1150675
static public function isInternalFunction($functionName)
    {
        $functionName = strtolower($functionName);

        return isset(self::$_STRING_FUNCTIONS[$functionName])
            || isset(self::$_DATETIME_FUNCTIONS[$functionName])
            || isset(self::$_NUMERIC_FUNCTIONS[$functionName]);
    }
341089
public function find(callable $func)
    {
        $found = null;

        foreach ($this->elements as $key => $value) {
            if($func($value, $key)) {
                $found = $value;
                break;
            }
        }

        return $found;
    }
938884
function filter($key=NULL,$func=NULL) {
        if (!$key)
            return array_keys($this->filter);
        if (!$func)
            return $this->filter[$key];
        $this->filter[$key]=$func;
    }
983928
public function isCallable($c)
    {
        if (is_string($c)) {
            return false;
        }
        if (is_object($c) && is_callable($c)) {
            return true;
        }

        return is_array($c) && isset($c[0]) && is_object($c[0]) && is_callable($c);
    }
1217114
public function isFunctionDisabled(string $function): bool
    {
        $disable_functions = explode(',', ini_get('disable_functions'));
        $disable_functions = array_map(static function (string $func): string {
            return strtolower(trim($func));
        }, $disable_functions);

        $function = strtolower($function);

        return in_array($function, $disable_functions, true) || !function_exists($function);
    }
659380
public function getFunctionsUsed( $excludePrefixes = array() )
	{
		if ( is_string( $excludePrefixes ) )
		{
			$excludePrefixes = array( $excludePrefixes );
		}

		$result = $this->traverseNodes( $this->exprTree, function( $node ) use( &$result, $excludePrefixes )
		{
			// TODO Test the functions in this node and return false if any are found
			return true;
		} );

		return ! $result;
	}
1172959
public function disallowPhpFunction($func)
    {
        if (is_array($func)) {
            foreach ($func as $fname) {
                unset($this->allowedPhpFunctions[strtolower($fname)]);
            }
        } else {
            unset($this->allowedPhpFunctions[strtolower($func)]);
        }
    }
71479
function registerShutdownFunc($func, $args = array())
    {
        // if we are called statically, there is a potential
        // that no shutdown func is registered.  Bug #6445
        if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
            register_shutdown_function("_PEAR_call_destructors");
            $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
        }
        $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
    }
325923
public function transaction( $func ) {
		$level = $this->_transaction_level;
		$this->_transaction_level ++;
		if ( $level === 0 ) {
			$this->_error = null;
			try {
				$this->begin();
				$func();
				$this->commit();

				return true;
			} catch ( \Exception $e ) {
				$this->rollback();
				$this->app->log( $e );
				$this->_error = $e;
			} finally {
				$this->_transaction_level = $level;
			}
		} else {
			try {
				$func();

				return true;
			} finally {
				$this->_transaction_level = $level;
			}
		}

		return false;
	}
559836
function reg_func($func_name,$func)
	{
	    if(!function_exists($func)) error(903);
	    $this->func_list[$func_name] = $func;
	}
938988
function hasOnlyOneStatement(func) {
    if (isFunctionDefinitionWithBlock(func)) {
        return _.get(func, 'body.body.length') === 1
    }
    if (func.type === 'ArrowFunctionExpression') {
        return !_.get(func, 'body.body')
    }
}
667567
private function isFunction()
    {
        $lookaheadType = $this->lexer->lookahead['type'];
        $peek          = $this->lexer->peek();

        $this->lexer->resetPeek();

        return ($lookaheadType >= Lexer::T_IDENTIFIER && $peek['type'] === Lexer::T_OPEN_PARENTHESIS);
    }
436207
def has(self, decorated_function, *args, **kwargs):
		
		return self.get_cache(decorated_function, *args, **kwargs).has_value
104975
public function Any( $Func )
	{

		$result = false;

		$Func = new Expression( $Func );

		foreach ( $this->repository as $item ) $result |= $Func->execute( $item );

		return (boolean)$result;

	}
510131
public function exists(callable $func)
    {
        $isExists = false;

        foreach ($this->elements as $key => $value) {
            if ($func($key, $value)) {
                $isExists = true;
                break;
            }
        }

        return $isExists;
    }
1248883
public function Sum( $Func = null )
	{
		$items = $this->Select( $Func );
		$sum   = 0;

		foreach ( $items as $item ) $sum += $item;

		return $sum;
	}