php中有size_t函数吗,lSize 命令/方法/函数
Returns the size of a list identified by Key. If the list didn't exist or is empty, the command returns 0. If the data type identified by Key is not a list, the command return FALSE.
根據KEY返回該KEY代表的LIST的長度,如果這個LIST不存在或者為空,那么ISIZE返回0,如果指定的KEY的數據類型不是LIST或者不為空,那么返回FALSE。所以在這里多說一句,當用ISize返回判斷值的時候,===就有用處了,這里FLASE和0是兩個概念了。
Parameters
Key
Return value
LONG The size of the list identified by Key exists.
如果KEY存在并且為LIST且有元素,那么返回KEY的長度,為空或者不存在返回0。
BOOL FALSE if the data type identified by Key is not list
如果KEY的數據類型不為空或者LIST,則返回FALSE。
Example
$redis->rPush('key1', 'A');
$redis->rPush('key1', 'B');
$redis->rPush('key1', 'C'); /* key1 => [ 'A', 'B', 'C' ] */
$redis->lSize('key1');/* 3 */
$redis->rPop('key1');
$redis->lSize('key1');/* 2 */
總結
以上是生活随笔為你收集整理的php中有size_t函数吗,lSize 命令/方法/函数的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python3 readline,Pyt
- 下一篇: php 我已阅读并同意 判断,phb.p