以下の(簡略化された)エラー処理を使用すると、 (8192)エラー$notice
がキャッチされます。E_DEPRECATED
の$notice
場合、値は 6143 で、そのビットマスクは次のとおりです。
0001011111111111
また、以下の のビットは含まれていませんE_DEPRECATED
。
0010000000000000
E_DEPRECATED
このエラー処理が(8192) エラーもキャッチする理由がわかりません。
$error = (int) E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_RECOVERABLE_ERROR | E_PARSE | E_USER_ERROR;
$warning = (int) $error | E_WARNING | E_CORE_WARNING | E_COMPILE_WARNING | E_USER_WARNING;
$notice = (int) $warning | E_NOTICE | E_USER_NOTICE;
$all = (int) $notice | E_STRICT | E_DEPRECATED | E_USER_DEPRECATED;
function error_handler($errno, $errstr, $errfile, $errline ) {
echo "$errno - $errfile:$errline $errstr") ;
}
error_reporting($notice);
set_error_handler("error_handler");