# DumpEntry

> Represents one key and its value inside an array, object, or enum block of a dump tree.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Panel](/docs/extensions/debug-core/reference/panel/index.md) › [Log](/docs/extensions/debug-core/reference/panel/log/index.md) › DumpEntry

| final readonly class | `PHPForge\Debug\Panel\Log\DumpEntry` |
| --- | --- |
| Source | [`src/Panel/Log/DumpEntry.php`](https://github.com/php-forge/debug-core/blob/main/src/Panel/Log/DumpEntry.php#L12) |

Represents one key and its value inside an array, object, or enum block of a dump tree.

Only the property keys of a `print_r()` object or enum dump, `stdClass` excluded, carry a visibility.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-declaringClass"></span>`$declaringClass` readonly constructor | `string` | Class declaring a private property; `''` otherwise. Default: `''`. | `DumpEntry` |
| <span id="property-key"></span>`$key` readonly constructor | `string` | Array key or property name. | `DumpEntry` |
| <span id="property-value"></span>`$value` readonly constructor | [`DumpNode`](/docs/extensions/debug-core/reference/panel/log/dumpnode/index.md) | Value associated with the key. | `DumpEntry` |
| <span id="property-visibility"></span>`$visibility` readonly constructor | `string` | `protected`, `private`, or `''` for a public property or an array key. Default: `''`. | `DumpEntry` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates a dump-tree entry with its key, value, and visibility. | `DumpEntry` |

## Method details

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

```php
public function __construct(string $key, PHPForge\Debug\Panel\Log\DumpNode $value, string $visibility = '', string $declaringClass = '')
```

Creates a dump-tree entry with its key, value, and visibility.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$key` | `string` | Array key or property name. |
| `$value` | [`DumpNode`](/docs/extensions/debug-core/reference/panel/log/dumpnode/index.md) | Value associated with the key. |
| `$visibility` | `string` | `protected`, `private`, or `''` for a public property or an array key. |
| `$declaringClass` | `string` | Class declaring a private property; `''` otherwise. |