# Gateway::getUidListByGroup ## 说明: ```php array Gateway::getUidListByGroup(mixed $group); ``` ``` (要求Gateway版本>=3.0.8) ``` [如何查看Gateway版本](get-gateway-version.md) 获取某个分组所有在线uid列表。 ## 返回值 返回uid为key同时uid也为值的数组。 类似下面的格式 ```php array( '123' => '123', '456' => '456' ) ``` ## 范例 ```php use \GatewayWorker\Lib\Gateway; class Events { ... public onMessage($client_id, $message) { $group = 'room-1'; Gateway::joinGroup($client_id, $group); Gateway::bindUid($client_id, 123); var_export(Gateway::getUidListByGroup($group)); } ... } ``` 打印出的数据类似如下: ```php array( '123' => '123', '456' => '456' ) ```