token_name

(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)

token_name获取提供的 PHP 解析器代号的符号名称

说明

token_name(int $token): string

token_name() 获取一个 PHP token 的符号名称.

参数

token

解析器代号的值.

返回值

提供的token 的符号名.

范例

示例 #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"
?>
add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

备份地址:http://www.lvesu.com/blog/php/function.token-name.php