2002-05-02 13:22:42 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2004-05-21 10:19:06 +00:00
|
|
|
<!-- $Revision: 1.6 $ -->
|
2002-05-02 13:22:42 +00:00
|
|
|
<refentry id="function.token-name">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>token_name</refname>
|
2003-02-06 09:38:26 +00:00
|
|
|
<refpurpose>Get the symbolic name of a given PHP token</refpurpose>
|
2002-05-02 13:22:42 +00:00
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
2003-02-06 09:38:26 +00:00
|
|
|
<methodsynopsis>
|
|
|
|
<type>string</type><methodname>token_name</methodname>
|
|
|
|
<methodparam><type>int</type><parameter>token</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2003-02-06 15:07:51 +00:00
|
|
|
<function>token_name</function> returns the symbolic name for a PHP
|
2003-02-06 09:38:26 +00:00
|
|
|
<parameter>token</parameter> value. The symbolic name
|
|
|
|
returned matches the name of the matching token constant.
|
|
|
|
</para>
|
2003-02-06 15:07:51 +00:00
|
|
|
<example>
|
2003-02-07 05:42:32 +00:00
|
|
|
<title><function>token_name</function> example</title>
|
2003-02-06 09:38:26 +00:00
|
|
|
<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>
|
2003-02-06 15:07:51 +00:00
|
|
|
</example>
|
2004-05-21 10:19:06 +00:00
|
|
|
<para>
|
|
|
|
See also <link linkend="tokens">List of Parser Tokens</link>.
|
|
|
|
</para>
|
2002-05-02 13:22:42 +00:00
|
|
|
</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
|
|
|
|
-->
|