# withFallback

Learn how to set a fallback for the evaluation.

This method sets a fallback value returned when the query cannot be evaluated.

Without a fallback, a failed evaluation throws an [exception](/reference/sdk/php/api/exceptions/croct-exception).

## Signature

This method has the following signature:

```php
public function withFallback(mixed $fallback): 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()->withFallback(false);
```

## Parameters

The following list describes the supported parameters:

- `fallback`: `mixed`

  The fallback value returned when the query cannot be evaluated.
