PHP Classes

pClosure: Create closure functions for any PHP 5 version

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 378 All time: 6,744 This week: 206Up
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 (2)  
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.

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  
 0%
Total:378
This week:0
All time:6,744
This week:206Up