Join Up!
104887 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousfunc_num_argsget_defined_functionsnext
Last updated: Tue, 28 May 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | German | Spanish

function_exists

(PHP 3>= 3.0.7, PHP 4 >= 4.0.0)

function_exists --  Return TRUE if the given function has been defined

Description

bool function_exists ( string function_name)

Checks the list of defined functions, both built-in (internal) and user-defined, for function_name. Palauttaa TRUE jos onnistui, FALSE jos epäonnistui.

if (function_exists('imap_open')) {
    echo "IMAP functions are available.<br>\n";
} else {
    echo "IMAP functions are not available.<br>\n";
}

Note that a function name may exist even if the function itself is unusable due to configuration or compiling options (with the image functions being an example). Also note that function_exists() will return FALSE for constructs, such as include_once() and echo().

See also method_exists() and get_defined_functions().

User Contributed Notes
function_exists
add a note about notes
There are no user contributed notes for this page.
previousfunc_num_argsget_defined_functionsnext
Last updated: Tue, 28 May 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST