array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), '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 Функції', ), 'prev' => array ( 0 => 'function.token-get-all.php', 1 => 'token_get_all', ), 'next' => array ( 0 => 'book.url.php', 1 => 'URLs', ), '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); ?>
(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
token_name — Get the symbolic name of a given PHP token
idThe token value.
The symbolic name of the given id.
Приклад #1 token_name() example
<?php
// 260 is the token value for the T_EVAL token
echo token_name(260); // -> "T_EVAL"
// a token constant maps to its own name
echo token_name(T_FUNCTION); // -> "T_FUNCTION"
?>