Undefined property: Swoole\ Server\ Port::$connections

the following error occurred when using connections:

foreach($serv->ports[0]->connections as $fd) {
    $serv->push($fd, json_encode($data));
}

Undefined property: SwooleServerPort::$connections,

the official document says that the pcre library is missing. The same error still occurs when
installs pcre-devel, and recompiles swoole.
ask for an answer.

Mar.11,2021
The

port iterator has been added in the new version. Please check if your swoole version supports this feature.

Menu