# Dump

> Renders JSON-safe values as display or parsable strings for the debugger panels.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Helper](/docs/extensions/debug-core/reference/helper/index.md) › Dump

| final class | `PHPForge\Debug\Helper\Dump` |
| --- | --- |
| Source | [`src/Helper/Dump.php`](https://github.com/php-forge/debug-core/blob/main/src/Helper/Dump.php#L19) |

Renders JSON-safe values as display or parsable strings for the debugger panels.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`asString()`](#method-asString) static | Renders a value as a display string: quoted strings, bare scalars, and 4-space-indented arrays without trailing commas. | `Dump` |
| [`export()`](#method-export) static | Renders a value as a parsable PHP expression: `var_export()` scalars and short-syntax arrays with trailing commas, omitting sequential integer keys. | `Dump` |

## Method details

### asString() <span id="method-asString"></span>

```php
public static function asString(mixed $value, int $depth = 10): string
```

Renders a value as a display string: quoted strings, bare scalars, and 4-space-indented arrays without trailing
commas.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `mixed` | JSON-safe value to render. |
| `$depth` | `int` | Maximum nesting level rendered before collapsing to `[...]`. |

**Returns**

`string`: Display string.

### export() <span id="method-export"></span>

```php
public static function export(mixed $value): string
```

Renders a value as a parsable PHP expression: `var_export()` scalars and short-syntax arrays with trailing
commas, omitting sequential integer keys.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `mixed` | JSON-safe value to render. |

**Returns**

`string`: Parsable PHP expression.