mirror of
https://github.com/php/doc-ru.git
synced 2026-03-27 17:22:14 +01:00
118 lines
3.5 KiB
XML
118 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: c44475e1fafcbee203ed4935a6d5d7a01379fcdc Maintainer: shein Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.function-exists" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>function_exists</refname>
|
|
<refpurpose>Возвращает &true;, если указанная функция определена</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>function_exists</methodname>
|
|
<methodparam><type>string</type><parameter>function</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Проверяет, есть ли в списке определённых функций, как встроенных (внутренних), так и
|
|
пользовательских, функция <parameter>function</parameter>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>function</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Имя функции в виде строки.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Возвращает &true;, если <parameter>function</parameter> существует и
|
|
является функцией, иначе возвращается &false;.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Эта функция возвращает &false; для языковых конструкций, таких
|
|
как <function>include_once</function>
|
|
или <function>echo</function>.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Пример использования <function>function_exists</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
if (function_exists('imap_open')) {
|
|
echo "Функции IMAP доступны.<br />\n";
|
|
} else {
|
|
echo "Функции IMAP недоступны.<br />\n";
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
Обратите внимание, что название функции может присутствовать, даже если
|
|
саму функцию невозможно использовать из-за настроек конфигурации или
|
|
опций компиляции (например, как для функций <link linkend="ref.image">image</link>).
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>method_exists</function></member>
|
|
<member><function>is_callable</function></member>
|
|
<member><function>get_defined_functions</function></member>
|
|
<member><function>class_exists</function></member>
|
|
<member><function>extension_loaded</function></member>
|
|
</simplelist>
|
|
</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:"~/.phpdoc/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
|
|
-->
|