4
我看到這個代碼在PHP documentation:什麼是異常嚴重的PHP?
try {
throw new ErrorException("Exception message", 0, E_USER_ERROR);
} catch(ErrorException $e) {
echo "This exception severity is: " . $e->getSeverity();
var_dump($e->getSeverity() === E_USER_ERROR);
}
它繼續:
This exception severity is: 256
bool(true)
什麼異常的嚴重性意味着,和我必須在所有使用它呢?