BadFunctioncallException
The BadFunctioncallException exception is thrown if the callback refers to an undefined function or if some arguments are missing.
BadFunctioncallException is defined by the SPL extension. It is not natively used.
<?php
function foo(string $s) {
if (empty($s)) {
throw new \UnexpectedValueException('Foo() expects a non-empty string');
}
}
?>