PrintRParser
API reference › Debug Core › Panel › Log › PrintRParser
Parses the output of print_r($value, true) for an array, object, or enum into a DumpNode tree.
Only the root header may carry free text before it, such as Request: Array. Any other deviation from the
print_r() layout, or an exceeded bound, yields null; the parser never throws.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
parse() static | Parses a print_r() dump of an array, object, or enum. | PrintRParser |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
MAX_BYTES | 262144 | Maximum size of a parsed message, in bytes, shared with PhpExportTokenizer. | PrintRParser |
MAX_DEPTH | 32 | Maximum nesting level of blocks, the root block included, shared with the export classes and DumpNode. | PrintRParser |
MAX_NODES | 5000 | Maximum number of values, the root block included, shared with PhpExportParser and DumpNode. | PrintRParser |
Method details
Section titled “Method details”parse()
Section titled “parse() ”public static function parse(string $message): PHPForge\Debug\Panel\Log\DumpNode|nullParses a print_r() dump of an array, object, or enum.
Parameters
| Parameter | Type | Description |
|---|---|---|
$message | string |
Returns
DumpNode|null: Root block, with the free text preceding its header as DumpNode::$text, or null for an unsupported message.