- http_response_code: documentation ( source)
- var_dump: documentation ( source)
- error_reporting: documentation ( source)
- set_error_handler: documentation ( source)
<?php
set_error_handler(function (int $serverity, string $message, string $filename, int $line) {
if (error_reporting() === 0) {
//C'รจ una @
} else {
http_response_code(500);
var_dump("throw");
throw new \ErrorException($message, 0, $serverity, $filename, $line);
}
});
$ciao = "ciao";
try {
$ciao();
}catch(\Throwable $e) {
var_dump("catc");
}