TOKEN_NAME(3) 1 TOKEN_NAME(3)
token_name - Get the symbolic name of a given PHP token
SYNOPSIS
string token_name (int $token)
DESCRIPTION
token_name(3) gets the symbolic name for a PHP $token value.
PARAMETERS
o $token
- The token value.
RETURN VALUES
The symbolic name of the given $token.
EXAMPLES
Example #1
token_name(3) 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"
?>
SEE ALSO
List of Parser Tokens.
PHP Documentation Group TOKEN_NAME(3)