PhpExportTokenizer
API reference › Debug Core › Panel › Log › PhpExportTokenizer
Tokenizes a log message that is the var_export() or VarDumper::export() output of an array or object.
Never evaluates the message and returns null for anything but exactly one such export expression.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
tokenize() static | Returns the tokens of a PHP value export. | PhpExportTokenizer |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
CLOSE_BRACKET | 93 | Token id of ]; a single-character token uses its byte value as id. | PhpExportTokenizer |
CLOSE_PARENTHESIS | 41 | Token id of ). | PhpExportTokenizer |
COMMA | 44 | Token id of ,. | PhpExportTokenizer |
DOT | 46 | Token id of .. | PhpExportTokenizer |
MINUS | 45 | Token id of -. | PhpExportTokenizer |
OPEN_BRACKET | 91 | Token id of [. | PhpExportTokenizer |
OPEN_PARENTHESIS | 40 | Token id of (. | PhpExportTokenizer |
Method details
Section titled “Method details”tokenize()
Section titled “tokenize() ”public static function tokenize(string $message): PhpToken[]|nullReturns the tokens of a PHP value export.
Parameters
| Parameter | Type | Description |
|---|---|---|
$message | string |
Returns
PhpToken[]|null: Expression tokens with whitespace, or null unless the message is one export expression within PrintRParser::MAX_BYTES bytes.