error_handler
A callback with the following signature. NULL may be passed instead, to
reset this handler to its default state. Instead of a function name, an
array containing an object reference and a method name can also be supplied.
handler ( int $errno , string $errstr [, string $errfile [, int $errline
[, array $errcontext ]]] ) : bool
Fonte:
https://www.php.net/manual/en/function.set-error-handler.php
Una domanda:
Perchè i parametri $errfile, $errline, $errcontext devono essere opzionali?