int Gateway::getClientIdCountByGroup(mixed $group);
```
``` (要求Gateway版本>=3.0.8) ```
获取某分组当前在线成连接数(## 参数
* ```$group```
分组名字
## 返回值
返回一个数字
注意:如果是客户端断网断电等极端情况掉线,客户端的onClose回调可能无法及时触发,参见[onClose](on-close.md## 范例
```php
use \GatewayWorker\Lib\Gateway;
class Events
{
...client_id, $group);
var_export(Gateway::getClientIdCountByGroup($group));
}
...
}
```
打印出的数据类似如下