# ServerVariableGrouper

> Partitions captured server variables into stable, framework-neutral diagnostic groups.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Panel](/docs/extensions/debug-core/reference/panel/index.md) › [Request](/docs/extensions/debug-core/reference/panel/request/index.md) › ServerVariableGrouper

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

Partitions captured server variables into stable, framework-neutral diagnostic groups.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`group()`](#method-group) static | Partitions the captured variables into the declared groups, dropping the groups that stay empty. | `ServerVariableGrouper` |

## Method details

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

```php
public static function group(array<int|string, mixed> $entries): list<PHPForge\Debug\Panel\Request\ServerVariableGroup>
```

Partitions the captured variables into the declared groups, dropping the groups that stay empty.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$entries` | `array<int\|string, mixed>` | Captured server variables, keyed by variable name. |

**Returns**

`list<`[`ServerVariableGroup`](/docs/extensions/debug-core/reference/panel/request/servervariablegroup/index.md)`>`: Non-empty groups in display order.