Is it possible for php to directly call the callback stored in the member variable of the class? I'm currently using a workaround where I temporarily save my callback for a local var.
class CB { private $cb; public function __construct($cb) { $this->cb = $cb; } public function call() { $this->cb();
php complains that $this->cb() not a valid method, i.e. does not exist.
source share