Callables

A callable is an object that can pass the callable type.

A callable may be a callback function or method, a closure or an arrow function.

Classes may also be callable, when they implement the magic method __invoke().

<?php

function foo() { echo __METHOD__; }

call_user_func('foo');

?>

Documentation

See also What Is the callable Type in PHP?

Related : Callbacks, Closure, __invoke() method, Arrow Functions