# option()

Shortcut for `$kirby->option($key, $default)`

****

- Source: <https://github.com/getkirby/kirby/tree/5.5.3/config/helpers.php#L378>

****

```php
option(string $key, mixed $default = null): mixed
```

## Parameters

| Name | Type | Default | Description |
| ---- | ---- | ---- | ---- |
| `$key` (required) | `string` | – | – |
| `$default` | `mixed` | `null` | – |

## Return type

`mixed`

## Examples

Fetch an option by key from the config:

```php
$locale = option('locale', 'en');
```

Custom option

```php
$myCustomOption = option('customOption');
```