php-opis-closure

serializable closures (anonymous functions) for PHP
  https://github.com/opis/closure
  0
  no reviews



PHP library that can be used to serialize closures (anonymous functions) and arbitrary objects. It aims to overcome PHP's limitations regarding closure serialization by providing a wrapper that will make all closures serializable.

Key features: * Serializes any closure and arbitrary objects * Doesn't use eval for closure serialization or unserialization * Handles all variables referenced in use(), recursive closures, static closures and magic constants * Automatically resolves all class names, function names and constant names used inside the closure * Track closure's residing source by using the #trackme directive * Simple and very fast parser * Proper exception handling for unserialized closures * Supports cryptographically signed closures * Provides a reflector for serialized closures * Automatically detects when the scope and/or bound object of a closure needs to be serialized in order for the closure to work after deserialization