mirror of
https://github.com/php/doc-ru.git
synced 2026-03-28 01:32:09 +01:00
89 lines
2.5 KiB
XML
89 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: cbac1ecf71d754707d69bdc344c4031c157eaa54 Maintainer: aur Status: ready -->
|
||
<!-- Reviewed: no -->
|
||
<refentry xml:id="function.token-name" xmlns="http://docbook.org/ns/docbook">
|
||
<refnamediv>
|
||
<refname>token_name</refname>
|
||
<refpurpose>Получить символьное имя для переданной PHP-лексемы</refpurpose>
|
||
</refnamediv>
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis>
|
||
<type>string</type><methodname>token_name</methodname>
|
||
<methodparam><type>int</type><parameter>id</parameter></methodparam>
|
||
</methodsynopsis>
|
||
<para>
|
||
Функция <function>token_name</function> получает символьное имя для значения PHP-лексемы
|
||
<parameter>id</parameter>.
|
||
</para>
|
||
</refsect1>
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
<para>
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><parameter>id</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
Значение лексемы.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</para>
|
||
</refsect1>
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
Символьное значение для переданной лексемы <parameter>id</parameter>.
|
||
</para>
|
||
</refsect1>
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<para>
|
||
<example>
|
||
<title>Пример использования <function>token_name</function></title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
// 260 - значение для лексемы T_EVAL
|
||
echo token_name(260); // -> "T_EVAL"
|
||
|
||
// Константа лексемы сопоставима с его собственным именем
|
||
echo token_name(T_FUNCTION); // -> "T_FUNCTION"
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
</example>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="seealso">
|
||
&reftitle.seealso;
|
||
<simplelist>
|
||
<member><link linkend="tokens">Список лексем</link></member>
|
||
<member><function>PhpToken::getTokenName</function></member>
|
||
</simplelist>
|
||
</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
|
||
-->
|