Is there any way in PHP to call an object like it\'s a function?
class Funct { public function __callSelf() { echo \'Called!\'; } } $myFunc = new Funct(
Try with __construct() or __invoke().
__construct()
__invoke()