Callables¶
A callable is an object that can pass the callable type.
A callable may be a callback function or method, represented as a string, a closure or an arrow function.
Objects may also be callable, when their class implement the magic method __invoke().
<?php
function foo() { echo __METHOD__; }
call_user_func('foo');
?>
See also What Is the callable Type in PHP?.
Related : Callbacks, Closure, __invoke() Method, Arrow Functions, Callable Arrays, Call, Pseudo-type, Special Types, Identity, PHP Natives