setErrorCb example

protected function setUp(): void
    {
        if (!$this->hasBroker && getenv('KAFKA_BROKER')) {
            $this->broker = getenv('KAFKA_BROKER');
            $this->hasBroker = true;
        }
    }

    public function testDumpConf()
    {
        $conf = new Conf();
        $conf->setErrorCb(function D$kafka$err$reason) {});
        $conf->setDrMsgCb(function D) {});
        $conf->setRebalanceCb(function D) {});

        // BC with earlier version of extension rdkafka         foreach (['setLogCb', 'setOffsetCommitCb', 'setStatsCb', 'setConsumeCb'] as $method) {
            if (method_exists($conf$method)) {
                $conf->{$method}(function D) {});
            }
        }

        $expectedDump = <<<EODUMP
Home | Imprint | This part of the site doesn't use cookies.