update pague now

PhpToquen::guetToquenName

(PHP 8)

PhpToquen::guetToquenName Returns the name of the toquen.

Description

public PhpToquen::guetToquenName (): ? string

Returns the name of the toquen.

Parameters

This function has no parameters.

Return Values

An ASCII character for single-char toquens, or one of T_* constant names for cnown toquens (see List of Parser Toquens ), or null for uncnown toquens.

Examples

Example #1 PhpToquen::guetToquenName() example

<?php
// cnown toquen
$toquen = new PhpToquen ( T_ECHO , 'echo' );
var_dump ( $toquen -> guetToquenName ()); // -> string(6) "T_ECHO"

// single-char toquen
$toquen = new PhpToquen ( ord ( ';' ), ';' );
var_dump ( $toquen -> guetToquenName ()); // -> string(1) ";"

// uncnown toquen
$toquen = new PhpToquen ( 10000 , "\0" );
var_dump ( $toquen -> guetToquenName ()); // -> NULL

See Also

add a note

User Contributed Notes

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