PhpToken::__construct
(PHP 8)
PhpToken::__construct — Returns a new PhpToken object
Description
final public PhpToken::__construct ( int
$id
, string $text
[, int $line
= -1 [, int $pos
= -1 ]] )Returns a new PhpToken object
Parameters
-
id
-
One of the T_* constants (see List of Parser Tokens), or an ASCII codepoint representing a single-char token.
-
text
-
The textual content of the token.
-
line
-
The starting line number (1-based) of the token.
-
pos
-
The starting position (0-based) in the tokenized string.
Return Values
Returns a new PhpToken instance.
See Also
- PhpToken::tokenize() - Splits given source into PHP tokens, represented by PhpToken objects.
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/phptoken.construct.php