<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.tokenizer.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.token-name.php',
    1 => 'token_name',
    2 => 'Get the symbolic name of a given PHP token',
  ),
  'up' => 
  array (
    0 => 'ref.tokenizer.php',
    1 => 'Tokenizer Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.token-get-all.php',
    1 => 'token_get_all',
  ),
  'next' => 
  array (
    0 => 'book.uri.php',
    1 => 'URI',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/tokenizer/functions/token-name.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.token-name" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">token_name</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">token_name</span> &mdash; <span class="dc-title">Get the symbolic name of a given PHP token</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.token-name-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>token_name</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$id</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>token_name()</strong></span> gets the symbolic name for a PHP 
   <code class="parameter">id</code> value. 
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.token-name-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">id</code></dt>
     <dd>
      <p class="para">
       The token value.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.token-name-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   The symbolic name of the given <code class="parameter">id</code>.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.token-name-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="function"><strong>token_name()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// 260 is the token value for the T_EVAL token<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">token_name</span><span style="color: #007700">(</span><span style="color: #0000BB">260</span><span style="color: #007700">);        </span><span style="color: #FF8000">// -&gt; "T_EVAL"<br /><br />// a token constant maps to its own name<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">token_name</span><span style="color: #007700">(</span><span style="color: #0000BB">T_FUNCTION</span><span style="color: #007700">); </span><span style="color: #FF8000">// -&gt; "T_FUNCTION"<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.token-name-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><a href="tokens.php" class="link">List of Parser Tokens</a></li>
   <li><span class="function"><a href="phptoken.gettokenname.php" class="function" rel="rdfs-seeAlso">PhpToken::getTokenName()</a> - Returns the name of the token.</span></li>
  </ul>
 </div>

</div><?php manual_footer($setup); ?>