title: how to check if exit is clean in a shutdown function in PHP?
body: <p>How can I test if exit is clean in a shutdown function in PHP?</p>
  
  <p>By clean exit I mean that the script was not terminated due to an error.</p>