php8.5
Home/ Manual/ reference / spl/ The UnexpectedValueException class

The UnexpectedValueException class

Exception thrown if a value does not match with a set of values. Typically this happens when a function calls another function and expects the return value to be of a certain type or value not including arithmetic or buffer related errors.

Intro

Exception thrown if a value does not match with a set of values. Typically this happens when a function calls another function and expects the return value to be of a certain type or value not including arithmetic or buffer related errors.

Class synopsis

extends RuntimeException { }

Source: reference/spl/unexpectedvalueexception.xml · from the official PHP manual (php/doc-en)