1
0
mirror of https://github.com/php/doc-ru.git synced 2026-04-27 01:08:05 +02:00
Files
archived-doc-ru/reference/funchand/functions/get-defined-functions.xml
T
2024-03-31 19:50:36 +03:00

162 lines
4.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: c44475e1fafcbee203ed4935a6d5d7a01379fcdc Maintainer: shein Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.get-defined-functions" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>get_defined_functions</refname>
<refpurpose>Возвращает массив определённых функций</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>get_defined_functions</methodname>
<methodparam choice="opt"><type>bool</type><parameter>exclude_disabled</parameter><initializer>&true;</initializer></methodparam>
</methodsynopsis>
<para>
Функция получает массив функций, которые определили.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>exclude_disabled</parameter></term>
<listitem>
<para>
Требуется ли исключать из результата отключённые функции.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Функция возвращает многомерный массив, который содержит список
определённых функций, как встроенных (внутренних), так и пользовательских.
Внутренние функции перечисляются в элементе массива
<varname>$arr["internal"]</varname>, а пользовательские —
в элементе <varname>$arr["user"]</varname> (смотрите пример ниже).
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
Значение по умолчанию для параметра <parameter>exclude_disabled</parameter>
изменили с &false; на &true;.
</entry>
</row>
<row>
<entry>7.0.15, 7.1.1</entry>
<entry>
Добавили параметр <parameter>exclude_disabled</parameter>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>
Пример использования функции <function>get_defined_functions</function>
</title>
<programlisting role="php">
<![CDATA[
<?php
function myrow($id, $data)
{
return "<tr><th>$id</th><td>$data</td></tr>\n";
}
$arr = get_defined_functions();
print_r($arr);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
Array
(
[internal] => Array
(
[0] => zend_version
[1] => func_num_args
[2] => func_get_arg
[3] => func_get_args
[4] => strlen
[5] => strcmp
[6] => strncmp
...
[750] => bcscale
[751] => bccomp
)
[user] => Array
(
[0] => myrow
)
)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>function_exists</function></member>
<member><function>get_defined_vars</function></member>
<member><function>get_defined_constants</function></member>
<member><function>get_declared_classes</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
-->