In-reply-to: neelam_ab2003 at yahoo dot co dot in
See the functions section of the manual, http://us2.php.net/manual/en/language.functions.php - once you call B() then function C will exist, and likewise for calling C to create D.
![]() | function_existsDescriptionbool function_exists ( string function_name )Checks the list of defined functions, both built-in (internal) and user-defined, for function_name. 如果成功则返回 TRUE,失败则返回 FALSE。
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(), is_callable() and get_defined_functions(). ![]()
chad 0x40 herballure 0x2e com
20-May-2006 01:06
In-reply-to: neelam_ab2003 at yahoo dot co dot in
neelam_ab2003 at yahoo dot co dot in
11-May-2006 03:06
<?php
chaumo
16-Jul-2005 08:46
to avoid direct calls this can be better than function_exists
fili at fili dot nl
09-Jun-2005 12:24
To prevent direct calls to included files i use the following technique.
codeslinger at compsalot dot com
02-Feb-2005 10:11
case-insensitive is by design
dark dot ryder at gmail dot com
07-Oct-2004 07:49
A note of caution: function_exists() appears to be case-insensitive (at least as of PHP 4.3.8). e.g.:
bob at thethirdshift dot net
24-Jun-2004 12:55
I, too, was wondering whether is_callable or function exists is faster when checking class methods. So, I setup the following test:
ckrack at i-z dot de
10-Mar-2004 04:22
i was wondering whether is_callable or function exists is faster when checking class methods.
breadman
30-Jul-2003 08:17
Functions within a function are better off as anonymous returns from create_function(), unless you want to be able to call it elsewhere.
dshearin at excite dot com
09-Jul-2003 06:15
This can be used to conditionally define a user function. In this sense, it can act as a sort of inline include_once().
@flop at escapesoft dot net@
07-Dec-2002 12:16
var_dump(function_exists(create_function('$a','return $a;'))); | ![]() | |