I’m trying to figure out the best way to unset a php session variable, after all pages have loaded and the page will be rendered to the browser. I have a page that includes & requires several pages to be rendered. I want to know if there is a built in php function that will tell php to do something right before the page is completed. Or what would the best way/practice to do this?
EDIT##
Here’s what I added…
function unsetHIST_ID(){unset($_SESSION['Hist_CID']);}
register_shutdown_function('unsetHIST_ID');
Am not sure why you want this but if you want a function to be executed after script
execution finishesorexit()is called then you should look at register_shutdown_functionExample
Output