Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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 trumpet() { echo __METHOD__; }

call_user_func('trumpet');

?>

Documentation

See Also