News Feed
Sections
News Archive


Community Events






feed this:

Eirik Hoem's Blog:
Dying with grace - PHP's register_shutdown_function
0 comments :: posted Monday March 17, 2008 @ 12:02:00
voice your opinion now!

Eirik Hoem has posted a new look at a function that can be amazingly helpful when you have a script with issues that needs a little extra help cleaning up after itself - register_shutdown_function.

Scripts tend to die, and that's not usually nice. We do not want to show the user a fatal error nor a blank page (display errors off) . PHP has a function called register_shutdown_function which lets us set up a function which is called at execution shutdown. What this means is that our function will be executed when our script is done executing / dying and PHP execution is about to shut down.

He suggests various things that can be done with the functionality, including checking for successful script execution (via a false variable that can be checked for success).

tagged with: registershutdownfunction shutdown function register die success



mysql code job application book package releases conference zend PEAR zendframework database release pecl security ajax PHP5 cakephp framework developer

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework