<?php class Foo { public $callable; } class Bar { public function __invoke() { echo 'DO IT'; } } $foo = new Foo; $foo->callable = [new Bar, '__invoke']; ($foo->callable)();
You have javascript disabled. You will not be able to edit any code.