PHP Classes

pClosure: Create closure functions for any PHP 5 version

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 377 All time: 6,710 This week: 216Up
Version License PHP version Categories
pclosure 0.1MIT/X Consortium ...5.0PHP 5, Data types, Language
Description Author

This class can be used to create closure functions that work with any PHP 5 version.

It uses a lambda function to enclose the closure object for simple execution.

Additionally, supports scalar type hinting and the ability to change execution scope of the closure object using a supported interface.

Innovation Award
PHP Programming Innovation award nominee
July 2009
Number 9
Closures are references to code that can work as a function but does not have a name nor is associated with any class.

PHP 5.3 is the first PHP version that introduced the support to closure functions.

This class provides an emulation of closure functions that works with any PHP 5 version, even before PHP 5.3.

Manuel Lemos
Picture of Sam S
Name: Sam S <contact>
Classes: 9 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 8x

  Files folder image Files  
File Role Description
Accessible without login Plain text file pClosure.php Class The class and two interface definitions.
Accessible without login Plain text file pClosure_test.php Example A series of example uses.

 Version Control Unique User Downloads Download Rankings  
 0%
Total:377
This week:0
All time:6,710
This week:216Up
For more information send a message to info at phpclasses dot org.