ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## rPush ##### Description Adds the string value to the tail (right) of the list. Creates the list if the key didn't exist. If the key exists and is not a list, `<span class="calibre12">FALSE</span>` is returned. 添加一个字符串值到LIST容器的底部(右侧),如果KEY不存在,曾创建一个LIST容器,如果KEY存在并且不是一个LIST容器,那么返回FLASE。##### Parameters *key* *value* String, value to push in key ##### Return value *LONG* The new length of the list in case of success, `<span class="calibre12">FALSE</span>` in case of Failure. 返回LIST容器最新的长度,如果ADD成功。失败则返回FALSE。##### Examples ``` <pre class="calibre9">$redis->delete('key1'); $redis->rPush('key1', 'A'); // returns 1 $redis->rPush('key1', 'B'); // returns 2 $redis->rPush('key1', 'C'); // returns 3 /* key1 now points to the following list: [ 'A', 'B', 'C' ] */ ```