Passing
- A PHP function is passed by its name as a string. Any built-in
- or user-defined function can be used, except language constructs such as:
- array, echo,
+ A PHP function is passed by either its name as a string or by
+ a first-class callable.
+ Any built-in or user-defined function can be used, except language constructs
+ such as: array, echo,
empty, eval,
exit, isset,
list, print or
@@ -125,7 +126,7 @@ call_user_func($c, 'PHP!');
- Callback example using a Closure
+ Callback example using a Closure