mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
function_exists: * Works on both internal/user defined functions.
* See also get_defined_functions. * Implemented &return.success; * Should we expand on when this "won't work", like with certain image functions? git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@73823 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f551986cb2
commit
4389459003
1 changed files with 11 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.28 $ -->
|
||||
<!-- $Revision: 1.29 $ -->
|
||||
<reference id="ref.funchand">
|
||||
<title>Function Handling functions</title>
|
||||
<titleabbrev>Functions</titleabbrev>
|
||||
|
@ -427,9 +427,8 @@ foo (1, 2, 3); // Prints 'Number of arguments: 3'
|
|||
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Checks the list of defined functions for
|
||||
<parameter>function_name</parameter>. Returns &true; if the given
|
||||
function name was found, &false; otherwise.
|
||||
Checks the list of defined functions, both built-in (internal) and
|
||||
user-defined, for <parameter>function_name</parameter>. &return.success;
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
|
@ -441,11 +440,16 @@ if (function_exists('imap_open')) {
|
|||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
Note that a function name may exist, even if the function itself
|
||||
is unusable due to configuration or compiling options.
|
||||
Note that a function name may exist even if the function itself
|
||||
is unusable due to configuration or compiling options (with the
|
||||
<link linkend="ref.image">image</link> functions being an example).
|
||||
Also note that <function>function_exists</function> will return
|
||||
&false; for constructs, such as <function>include_once</function>
|
||||
and <function>echo</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>method_exists</function>.
|
||||
See also <function>method_exists</function> and
|
||||
<function>get_defined_functions</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue