PHP Classes

PHP Shutdown Function Shutdown Helper: Register functions to be called when a script ends

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 62 All time: 10,453 This week: 660Up
Version License PHP version Categories
shutdown-helper 1.0MIT/X Consortium ...5PHP 5, Language
Description 

Author

This is a simple class that register functions to be called when a script ends.

It takes one or more a callback functions and queues them to be called later and the end of the current PHP script.

The class can also add new callback functions in the beginning of the queue, instead of adding at the end.

When the script exits the class traverses the list of registered shutdown callback functions and call them by the order they were stored in the queue.

Picture of Till Wehowski
  Performance   Level  
Name: Till Wehowski <contact>
Classes: 30 packages by
Country: Germany Germany
Age: 45
All time rank: 107269 in Germany Germany
Week rank: 49 Up3 in Germany Germany Up
Innovation award
Innovation award
Nominee: 12x

Documentation

shutdown-helper

Reverse order register_shutdown manager

Installation

$ composer install frdl/shutdown-helper

Usage

$ShutdownTasks = \frdlweb\Thread\ShutdownTasks::mutex();
$ShutdownTasks(function($start){
	print_r( date('c', time()).' execution microtime >= '.microtime() - $start );
}, microtime());


  Files folder image Files (4)  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (4)  /  src  
File Role Description
  Accessible without login Plain text file ShutdownTasks.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:62
This week:0
All time:10,453
This week:660Up