Login   Register  
PHP Classes
elePHPant
Icontem

pClosure: Create closure functions for any PHP 5 version

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (5 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 364 All time: 6,110 This week: 1,486Up
Version License PHP version Categories  
pclosure 0.1MIT/X Consortium License5.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: 38
All time rank: 36940 in United States United States
Week rank: 371 Down38 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  
 0%Total:364All time:6,110
 This week:0This week:1,486Up