2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2002-04-17 06:45:35 +00:00
|
|
|
<!-- $Revision: 1.2 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 -->
|
|
|
|
<refentry id="function.function-exists">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>function_exists</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Return &true; if the given function has been defined
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>bool</type><methodname>function_exists</methodname>
|
|
|
|
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
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[
|
|
|
|
if (function_exists('imap_open')) {
|
|
|
|
echo "IMAP functions are available.<br>\n";
|
|
|
|
} else {
|
|
|
|
echo "IMAP functions are not available.<br>\n";
|
|
|
|
}
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</informalexample>
|
|
|
|
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> and
|
|
|
|
<function>get_defined_functions</function>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|