src/pubcontrol.php
public function publish_async($channel, $item, $callback=null)
    {
        if (!$this->is_async_supported())
            throw new \RuntimeException('Asynchronous publishing not supported. '
                    . 'Recompile PHP with --enable-maintainer-zts to ' 
                    . 'turn pthreads on.');
        $cb = null;
        if (!is_null($callback))
        {
            $pcccbhandler = null;
            foreach ($this->pcccbhandlers as $key => $value)
                if ($value->completed)
                {
                    $pcccbhandler = $value;
                    $pcccbhandler->update(count($this->clients), $callback);
                    break;
                }
            if (is_null($pcccbhandler))  
            {
                $pcccbhandler = new PubControlClientCallbackHandler(
                        count($this->clients), $callback);
                $this->pcccbhandlers[] = $pcccbhandler;
            }
            $cb = array($pcccbhandler, 'handler');
        }
        foreach ($this->clients as $client)
            $client->publish_async($channel, $item, $cb);
    }
public function publish_async($channel, $item, $callback=null)
    {
        if (!$this->is_async_supported())
            throw new \RuntimeException('Asynchronous publishing not supported. '
                    . 'Recompile PHP with --enable-maintainer-zts to ' 
                    . 'turn pthreads on.');
        $cb = null;
        if (!is_null($callback))
        {
            $pcccbhandler = null;
            foreach ($this->pcccbhandlers as $key => $value)
                if ($value->completed)
                {
                    $pcccbhandler = $value;
                    $pcccbhandler->update(count($this->clients), $callback);
                    break;
                }
            if (is_null($pcccbhandler))  
            {
                $pcccbhandler = new PubControlClientCallbackHandler(
                        count($this->clients), $callback);
                $this->pcccbhandlers[] = $pcccbhandler;
            }
            $cb = array($pcccbhandler, 'handler');
        }
        foreach ($this->clients as $client)
            $client->publish_async($channel, $item, $cb);
    }
limitations.