hasFallback

Learn how to check whether a fallback was set.

This method checks whether a fallback value has been set for the evaluation.

Signature

This method has the following signature:

public function hasFallback(): bool

This method returns true when a fallback has been set, or false otherwise (the default).

Example

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

<?phpuse Croct\Plug\EvaluationOptions;
$options = EvaluationOptions::defaults()->withFallback(false);$hasFallback = $options->hasFallback();