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    
Last Updated Ratings Unique User Downloads Download Rankings
2009-07-13 (7 years ago) RSS 2.0 feedNot enough user ratingsTotal: 375 All time: 6,399 This week: 880Up
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 Shull
Name: Sam Shull <contact>
Classes: 9 packages by
Country: United States United States
Age: 40
All time rank: 35241 in United States United States
Week rank: 141 Up13 in United States United States Up
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  
This week:0
All time:6,399
This week:880Up