PHP CallbacksIt is possible to assign a PHP closure to a native variable of function pointer type or to pass it as a function argument: Example #1 Assigning a PHP Closure to a C function pointer The above example will output:
Hello World 1!
{
Hello World 2!
}
Hello World 3!
Tip
It is therefore recommended to minimize the usage of PHP callbacks. |