PhpToken::__construct
(PHP 8)
PhpToken::__construct — Returns a new PhpToken object
Description
Returns a new PhpToken object
Parameters
idOne of the T_* constants (see List of Parser Tokens), or an ASCII codepoint representing a single-char token.
textThe textual content of the token.
lineThe starting line number (1-based) of the token.
posThe starting position (0-based) in the tokenized string (the number of bytes).
See Also
- PhpToken::tokenize() - Splits given source into PHP tokens, represented by PhpToken objects.
↑ and ↓ to navigate • Enter to select • Esc to close • / to open