First method to specify a callback function is to simply the pass the name of the function as a string.
Second method is used when you want to use an object's method as callback function. In that case, you pass a two element array as the argument, value at index 0 is the object itself and value at index 1 is the method name as string. Third method is used when you want to use a static class method as callback function. You pass a two element array here as well, value at index 0 is the class name as a string and value at index 1 is the class method name as string. Finally, you can also create anonymous callback functions by using create_function function.
|