Call function when script is terminated
<p>I'd like to call a function when the script is terminated by die() or exit(). My wish is to do this automatically, so I don't have to call function all the time.</p>

<p>Is this possible?</p>
