The following table lists all the currently implemented generic functions:
Class | Description |
---|---|
CaptureErrors (code) |
Calls a function, capturing all PHP errors raised during the execution of the function. Provides access to the queue of captured errors afterwards. |
ExceptionToError (code) |
Calls a function, rerouting any raised exception to a userland triggered error and returning false. Useful in conjunction with CaptureErrors . |
Expression (code) |
Converts a string containing a PHP expression into a callable. Useful when you want to build small functions without the overhead of PHP closure syntax. |
Improve (code) |
Repetively refine a guess until it reaches an acceptable answer. Useful in mathematics, to converge on a value such as the golden ratio or the root of an equation. |
Retry (code) |
Retries a function until the function succeeds or fails the retry strategy. The default retry strategy attempts 5 calls and exponentially increases the delay between each call. You can define your own retry strategy. |
Y (code) |
Implements the Y-combinator, which is a way to express a recursive algorithm with neither recursion nor iteration. |