mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 10:28:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@115030 c90b9560-bf6c-de11-be94-00142212c4b1
55 lines
1.5 KiB
XML
55 lines
1.5 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<refentry id="function.token-name">
|
|
<refnamediv>
|
|
<refname>token_name</refname>
|
|
<refpurpose>Get the symbolic name of a given PHP token</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>token_name</methodname>
|
|
<methodparam><type>int</type><parameter>token</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>token_name</function> returns the symbolic name for a PHP
|
|
<parameter>token</parameter> value. The symbolic name
|
|
returned matches the name of the matching token constant.
|
|
</para>
|
|
<example>
|
|
<title><function>token_name</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// 260 is the token value for the T_REQUIRE token
|
|
echo token_name(260); // -> "T_REQUIRE"
|
|
|
|
// a token constant maps to its own name
|
|
echo token_name(T_FUNCTION); // -> "T_FUNCTION"
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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
|
|
-->
|