array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'phptoken.tostring.php', 1 => 'PhpToken::__toString', 2 => 'Returns the textual content of the token.', ), 'up' => array ( 0 => 'class.phptoken.php', 1 => 'PhpToken', ), 'prev' => array ( 0 => 'phptoken.isignorable.php', 1 => 'PhpToken::isIgnorable', ), 'next' => array ( 0 => 'phptoken.tokenize.php', 1 => 'PhpToken::tokenize', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/tokenizer/phptoken/toString.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

PhpToken::__toString

(PHP 8)

PhpToken::__toStringReturns the textual content of the token.

说明

public PhpToken::__toString(): string

Returns the textual content of the token.

参数

此函数没有参数。

返回值

A textual content of the token.

示例

示例 #1 PhpToken::__toString() example

<?php
$token
= new PhpToken(T_ECHO, 'echo');
echo
$token;

以上示例会输出:

echo

参见