PHP 8.4.2 Released!

PhpToken::__toString

(PHP 8)

PhpToken::__toStringReturns the textual content of the token.

Description

public PhpToken::__toString(): string

Returns the textual content of the token.

Parameters

This function has no parameters.

Return Values

A textual content of the token.

Examples

Example #1 PhpToken::__toString() example

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

The above examples will output:

echo

See Also

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top