Document toolboxDocument toolbox

Callable Functions

PHPv8+ allows for dynamically generated callable functions. This syntax allows you to modularize your Custom Logic.'

Example:

This example defines and stores a new function into the $fnctName variable. This function-variable can then be invoked later using the call notation.

$fnctName = function( $parameter1, $parameter2, // ... more params if needed ){ // Do something in the function // with the parameters }; $fnctName->call($this, $param1, $param2);