php8.5
Home/ Manual/ tokenizer / phptoken/ PhpToken::__toString

PhpToken::__toString

PHP function Edit on GitHub ✎

(PHP 8)

Returns the textual content of the token.

Description

PhpToken::__toString(): string

Returns the textual content of the token.

Parameters Parameters

Return Values

A textual content of the token.

Examples

PhpToken::__toString() example

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

Outputs

output
echo

See Also

Source: reference/tokenizer/phptoken/toString.xml · from the official PHP manual (php/doc-en)