If I have a logging class named Logger, can I define a special method within the class to be called when the instance of the class is used as a function? So instead of using log.method(), it would be possible to use log() directly like this:
log(...)
In PHP, by implementing the __invoke() magic method in a class, you can achieve similar functionality.