PHP provides super easy feature can put a function as a part of function parameter. You can just put it like function exampleMethod( $customFunc).
In order to do it, the function must be coded like a variable as below:
Note that the function variable must be declared like a normal variable, and its functional code must be ended by semicolon.
Below is an example