title: Catching all errors in PHP
body: <p>I want to catch all errors and, depending on its type, do some sort of operations. I'd like to handle the following types of errors:</p>
  
  <ul>
  <li>notices</li>
  <li>warnings</li>
  <li>errors</li>
  <li>critical errors</li>
  <li>alerts</li>
  <li>emergencies</li>
  </ul>
  
  <p>Can I do these with set_error_handler() function? </p>
  
  <p>And is there any difference between E_USER_WARNING and E_WARNING?</p>