Token
in package
FinalYes
One lexed token. `start`/`end` are **codepoint indices**, not byte offsets -- {@see Lexer} operates on the source split into an array of single-codepoint strings (`preg_split('//u', ...)`) rather than raw byte-indexed PHP strings, which sidesteps multi-byte UTF-8 sequences entirely (a JS port indexes UTF-16 code units natively; PHP strings are raw bytes, so this port picks codepoints as its own natural, consistently-defined unit instead).
Table of Contents
Properties
Methods
- __construct() : mixed
Properties
$end read-only
public
int
$end
$isQuoted read-only
public
bool
$isQuoted
= false
$start read-only
public
int
$start
$type read-only
public
string
$type
$value read-only
public
mixed
$value
Methods
__construct()
public
__construct(string $type, mixed $value, int $start, int $end[, bool $isQuoted = false ]) : mixed
Parameters
- $type : string
- $value : mixed
- $start : int
- $end : int
- $isQuoted : bool = false