Calling an invokable in an instance variable
Invokables in PHP are classes that you can use as a function. They have been around since PHP 5.3 and have many interesting use cases. Here's a quick example. class Invokable { public function __invoke() { echo 'I have been invoked'; } } You can use it like this: // outputs 'I have been…