 |
|
Innovation award
 Nominee: 2x |
This class can defer executing of code to emulate final functions.
It can register functions to be called when the object is destroyed, so the functions are only executed when the current function or scope ends and the class destructor is called.
The class can also register references to variables that will also be unset by the class destructor when the current function or scope ends.
|
|
| Name: |
Defer |
| Base name: |
defer |
| Description: |
Defer executing of code to emulate final functions |
| Version: |
1.0 |
| PHP version: |
5.3 |
| License: |
BSD License |
| All time users: |
321 users |
| All time rank: |
5981 |
| Week users: |
1 user |
| Week rank: |
2036  |
| |
|
 January 2013
Number 4 |
The finally construct introduced in PHP 5.5 allows developers to defined some code that will always be executed regardless if an exception is thrown.
This class implements a different approach to achieve the same purpose of finally, except that it works even in older PHP versions.
It uses cleverly a class destructor function to execute code that will always be executed when an object is destructed while PHP is exiting the function or scope on which an object of this class was created.
Manuel Lemos |
| There are not enough user ratings to display for this class. |
| |
Applications that use this class |
|
|
No application links were specified for this class.

If you know an application of this package, send a message to the
author to add a link here.
| |
Files |
|
|