Query: function_exists
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
FUNCTION_EXISTS(3) 1 FUNCTION_EXISTS(3) function_exists - Return TRUEif the given function has been definedSYNOPSISbool function_exists (string $function_name)DESCRIPTIONChecks the list of defined functions, both built-in (internal) and user-defined, for $function_name.PARAMETERSo $function_name - The function name, as a string.RETURN VALUESReturns TRUE if $function_name exists and is a function, FALSE otherwise. Note This function will return FALSE for constructs, such as include_once(3) and echo(3).EXAMPLESExample #1 function_exists(3) example <?php if (function_exists('imap_open')) { echo "IMAP functions are available.<br /> "; } else { echo "IMAP functions are not available.<br /> "; } ?>NOTESNote A function name may exist even if the function itself is unusable due to configuration or compiling options (with the image func- tions being an example).SEE ALSOmethod_exists(3), is_callable(3), get_defined_functions(3), class_exists(3), extension_loaded(3). PHP Documentation Group FUNCTION_EXISTS(3)
Related Man Pages |
---|
gearmanworker(3) - php |
function_exists(3) - php |
get_defined_functions(3) - php |
is_callable(3) - php |
method_exists(3) - php |
Similar Topics in the Unix Linux Community |
---|
Check if file exists, and create file |
Source functions from variable |