1 system.api.php hook_exit($destination = NULL)

Perform cleanup tasks.

This hook is run at the end of most regular page requests. It is often used for page logging and specialized cleanup. This hook MUST NOT print anything because by the time it runs the response is already sent to the browser.

This hook by default is not called on pages served by the default page cache, but can be enabled through the $settings['page_cache_invoke_hook'] option in settings.php.


$destination: If this hook is invoked as part of a backdrop_goto() call, then this argument will be a fully-qualified URL that is the destination of the redirect.

Related topics


core/modules/system/system.api.php, line 280
Hooks provided by Backdrop core and the System module.


function hook_exit($destination = NULL) {
    ->expression('hits', 'hits + 1')
    ->condition('type', 1)