<?php
try {
$func = function(Hoge $hoge) {
echo '★★func called!★★', PHP_EOL;
};
set_error_handler (function ($errno, $errstr, $errfile, $errline) {
printf('★★error handler at line(%d) called! errno = %d★★' . PHP_EOL, __LINE__, $errno);
echo $errstr, PHP_EOL;
return;
});
$func();
echo '-----', PHP_EOL;
set_error_handler (function ($errno, $errstr, $errfile, $errline) {
printf('★★error handler at line(%d) called! errno = %d★★' . PHP_EOL, __LINE__, $errno);
echo $errstr, PHP_EOL;
return false;
});
$func();
} catch (\Error $e) {
echo $e->getMessage();
}
preferences:
72.16 ms | 405 KiB | 5 Q