# withAttributes

Learn how to set the context attributes for the evaluation.

This method sets the context attributes for the evaluation, replacing any existing ones.

## Signature

This method has the following signature:

```php
public function withAttributes(array $attributes): self
```

This method returns a copy of the options with the change applied, leaving the original unchanged.

## Example

Here is a basic example of how to use this method:

```php
<?php
use Croct\Plug\EvaluationOptions;

$options = EvaluationOptions::defaults()->withAttributes(['plan' => 'premium']);
```

## Parameters

The following list describes the supported parameters:

- `attributes`: `array`

  The context attributes for the evaluation, replacing any existing ones.
