Tournas Dimitrios

With over 6000 build-in functions , PHP provides a flexible platform to build our web-applications . One function that deserves to be on our top-list tool-set is register_shutdown_function() . This function allows you to execute a block of code whenever your script ends — for any reason . You could imagine it as a software hook , whatever the reason your  script terminates (just finishes , die() , exit() , Fatal-Error) , a block of custom code will be executed . You can use this call to register as many shutdown functions as you want , and they will get executed in the order that they get applied . But please stay focused on the purpose it was developed for , just a bit of extra code . The  functionality of your script must remain (be executed) in the main body of the PHP code .

Use of this function is very straight-forward :


View original post 201 more words


About samehramzylabib

See About on
This entry was posted in PHP Debugging, PHP Error Handling and tagged . Bookmark the permalink.


Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s