<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>https://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>https://jackxiang.com/post//</link>
<title><![CDATA[[实践Ok]Redis学习手册(Hashes数据类型)，以及PHP代码如何操作Redis的Hash实现。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Cache与Store]]></category>
<pubDate>Sat, 24 Jun 2017 04:38:52 +0000</pubDate> 
<guid>https://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	背景：对于一些Redis里所提供的数据结构，用Hash可能是用得最多的，为何呢？因为日常中很多东西都可以用它来表示。<br/>把一个复杂的需要序列化的东西变为一个HashTable进行存储，利用Hash存储节约内存,这样还可能更快更少的消耗实现高并发:<br/><br/>&lt;?php<br/>/** 每天下达指令的也就是x权限（每种鸡蛋的上下限），<br/>而r就是只有看温度的权限，而w就是有设置温度权限 **/<br/><br/>$arr = array(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&quot;tcp&quot; =&gt;array(<br/>&nbsp;&nbsp;&quot;ip&quot;=&gt;&quot;192.168.1.1&quot;,<br/>&nbsp;&nbsp;&quot;fd&quot;=&gt;&quot;2&quot;,<br/>&nbsp;&nbsp;&quot;mac&quot;=&gt;&quot;00-50-56-C0-00-08&quot;,<br/>&nbsp;&nbsp;&quot;chineseName&quot;=&gt;&quot;蛋壳108109&quot;,<br/>&nbsp;&nbsp;&quot;EnglishName&quot;=&gt;&quot;LevooAllCanBeHatch&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;),<br/>&nbsp;&nbsp;&nbsp;&nbsp;&quot;frame&quot; =&gt;array(<br/>&nbsp;&nbsp;array(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;ip&quot;=&gt;&quot;192.168.1.1&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;fd&quot;=&gt;&quot;2&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;token&quot;=&gt;&quot;jfdjfldjflkdjdjfkldf&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;isconnected&quot;=&gt;0,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;chmod&quot;=&gt;&quot;rwx&quot;<br/><br/>&nbsp;&nbsp;),<br/>&nbsp;&nbsp;array(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;ip&quot;=&gt;&quot;192.168.1.1&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;fd&quot;=&gt;&quot;2&quot;,&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;token&quot;=&gt;&quot;jfdjfldjflkdjdj1fkl2df&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;isconnected&quot;=&gt;1,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;chmod&quot;=&gt;&quot;rw&quot;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;),<br/>&nbsp;&nbsp;array(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;ip&quot;=&gt;&quot;192.168.1.1&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;fd&quot;=&gt;&quot;2&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;token&quot;=&gt;&quot;jfdjfldjflkdjdjfk33ld22f&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;isconnected&quot;=&gt;1,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;chmod&quot;=&gt;&quot;x&quot;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;),<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;ip&quot;=&gt;&quot;192.168.1.1&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;fd&quot;=&gt;&quot;2&quot;,&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;token&quot;=&gt;&quot;jfdjfl323djdjfkld22f&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;isconnected&quot;=&gt;1,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;chmod&quot;=&gt;&quot;rwx&quot;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;),<br/>&nbsp;&nbsp;array(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;ip&quot;=&gt;&quot;192.168.1.1&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;fd&quot;=&gt;&quot;2&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;token&quot;=&gt;&quot;jf1121fldjflkdjdjfkld22f&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;isconnected&quot;=&gt;1,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;chmod&quot;=&gt;&quot;rwx&quot;<br/>&nbsp;&nbsp;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;)<br/>);<br/>print_r($arr);<br/>echo json_encode($arr);<br/>?&gt;<br/><br/><br/><br/><br/>命令示例：<br/>&nbsp;&nbsp;&nbsp;&nbsp;1. HSET/HGET/HDEL/HEXISTS/HLEN/HSETNX:<br/>&nbsp;&nbsp;&nbsp;&nbsp;#在Shell命令行启动Redis客户端程序<br/>&nbsp;&nbsp;&nbsp;&nbsp;/&gt; redis-cli<br/>&nbsp;&nbsp;&nbsp;&nbsp;#给键值为myhash的键设置字段为field1，值为stephen。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hset myhash field1 &quot;stephen&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;#获取键值为myhash，字段为field1的值。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hget myhash field1<br/>&nbsp;&nbsp;&nbsp;&nbsp;&quot;stephen&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;#myhash键中不存在field2字段，因此返回nil。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hget myhash field2<br/>&nbsp;&nbsp;&nbsp;&nbsp;(nil)<br/>&nbsp;&nbsp;&nbsp;&nbsp;#给myhash关联的Hashes值添加一个新的字段field2，其值为liu。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hset myhash field2 &quot;liu&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;#获取myhash键的字段数量。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hlen myhash<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 2<br/>&nbsp;&nbsp;&nbsp;&nbsp;#判断myhash键中是否存在字段名为field1的字段，由于存在，返回值为1。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hexists myhash field1<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;#删除myhash键中字段名为field1的字段，删除成功返回1。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hdel myhash field1<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;#再次删除myhash键中字段名为field1的字段，由于上一条命令已经将其删除，因为没有删除，返回0。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hdel myhash field1<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 0<br/>&nbsp;&nbsp;&nbsp;&nbsp;#判断myhash键中是否存在field1字段，由于上一条命令已经将其删除，因为返回0。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hexists myhash field1<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 0<br/>&nbsp;&nbsp;&nbsp;&nbsp;#通过hsetnx命令给myhash添加新字段field1，其值为stephen，因为该字段已经被删除，所以该命令添加成功并返回1。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hsetnx myhash field1 stephen<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;#由于myhash的field1字段已经通过上一条命令添加成功，因为本条命令不做任何操作后返回0。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hsetnx myhash field1 stephen<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 0<br/><br/>&nbsp;&nbsp; 2. HINCRBY：<br/>&nbsp;&nbsp;&nbsp;&nbsp;#删除该键，便于后面示例的测试。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; del myhash<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;#准备测试数据，该myhash的field字段设定值1。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hset myhash field 5<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;#给myhash的field字段的值加1，返回加后的结果。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hincrby myhash field 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 6<br/>&nbsp;&nbsp;&nbsp;&nbsp;#给myhash的field字段的值加-1，返回加后的结果。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hincrby myhash field -1<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 5<br/>&nbsp;&nbsp;&nbsp;&nbsp;#给myhash的field字段的值加-10，返回加后的结果。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hincrby myhash field -10<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) -5&nbsp;&nbsp; <br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;3. HGETALL/HKEYS/HVALS/HMGET/HMSET:<br/>&nbsp;&nbsp;&nbsp;&nbsp;#删除该键，便于后面示例测试。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; del myhash<br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;#为该键myhash，一次性设置多个字段，分别是field1 = &quot;hello&quot;, field2 = &quot;world&quot;。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hmset myhash field1 &quot;hello&quot; field2 &quot;world&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;OK<br/>&nbsp;&nbsp;&nbsp;&nbsp;#获取myhash键的多个字段，其中field3并不存在，因为在返回结果中与该字段对应的值为nil。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hmget myhash field1 field2 field3<br/>&nbsp;&nbsp;&nbsp;&nbsp;1) &quot;hello&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;2) &quot;world&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;3) (nil)<br/>&nbsp;&nbsp;&nbsp;&nbsp;#返回myhash键的所有字段及其值，从结果中可以看出，他们是逐对列出的。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hgetall myhash<br/>&nbsp;&nbsp;&nbsp;&nbsp;1) &quot;field1&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;2) &quot;hello&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;3) &quot;field2&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;4) &quot;world&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;#仅获取myhash键中所有字段的名字。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hkeys myhash<br/>&nbsp;&nbsp;&nbsp;&nbsp;1) &quot;field1&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;2) &quot;field2&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;#仅获取myhash键中所有字段的值。<br/>&nbsp;&nbsp;&nbsp;&nbsp;redis 127.0.0.1:6379&gt; hvals myhash<br/>&nbsp;&nbsp;&nbsp;&nbsp;1) &quot;hello&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;2) &quot;world&quot; <br/><br/>来自：http://www.cnblogs.com/stephen-liu74/archive/2012/03/19/2352932.html<br/>实践如下：<br/>Redis学习手册(Hashes数据类型):<br/><br/>/usr/local/redis/bin/redis-cli -h 10.44.202.177 -p 6379<br/>10.44.202.177:6379&gt; hset myhash field1 &quot;stephen&quot;<br/>(integer) 1<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hget myhash field1<br/>&quot;stephen&quot;<br/>10.44.202.177:6379&gt; hget myhash field2<br/>(nil)<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hset myhash field2 &quot;liu&quot;<br/>(integer) 1<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hlen myhash<br/>(integer) 2<br/>10.44.202.177:6379&gt; hexists myhash field1<br/>(integer) 1<br/>10.44.202.177:6379&gt; <br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hdel myhash field1<br/>(integer) 1<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hdel myhash field1<br/>(integer) 0<br/>10.44.202.177:6379&gt; hexists myhash field1<br/>(integer) 0<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hsetnx myhash field1 stephen<br/>(integer) 1<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hsetnx myhash field1 stephen<br/>(integer) 0<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;del myhash<br/>(integer) 1<br/>10.44.202.177:6379&gt; hset myhash field 5<br/>(integer) 1<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hincrby myhash field 1<br/>(integer) 6<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hincrby myhash field -1<br/>(integer) 5<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hincrby myhash field -10<br/>(integer) -5<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;del myhash<br/>(integer) 1<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hmset myhash field1 &quot;hello&quot; field2 &quot;world&quot;<br/>OK<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hmget myhash field1 field2 field3<br/>1) &quot;hello&quot;<br/>2) &quot;world&quot;<br/>3) (nil)<br/>10.44.202.177:6379&gt; hgetall myhash<br/>1) &quot;field1&quot;<br/>2) &quot;hello&quot;<br/>3) &quot;field2&quot;<br/>4) &quot;world&quot;<br/>10.44.202.177:6379&gt;&nbsp;&nbsp;hkeys myhash<br/>1) &quot;field1&quot;<br/>2) &quot;field2&quot;<br/>10.44.202.177:6379&gt; hvals myhash<br/>1) &quot;hello&quot;<br/>2) &quot;world&quot;<br/><br/><br/><br/>PHP如何设置Hash：<br/><br/>&lt;?php<br/>$redis = new redis();<br/>$redis-&gt;connect(&#039;10.51.77.34&#039;, 6379);<br/>$redis-&gt;delete(&#039;test&#039;);<br/>$redis-&gt;hset(&#039;test&#039;, &#039;key1&#039;, &#039;hello&#039;);<br/>echo $redis-&gt;hget(&#039;test&#039;, &#039;key1&#039;);&nbsp;&nbsp;&nbsp;&nbsp; //结果：hello<br/><br/>echo &quot;&lt;br&gt;&quot;;<br/>$redis-&gt;hSetNx(&#039;test&#039;, &#039;key1&#039;, &#039;world&#039;);<br/>echo $redis-&gt;hget(&#039;test&#039;, &#039;key1&#039;);&nbsp;&nbsp; //结果：hello<br/><br/>$redis-&gt;delete(&#039;test&#039;);<br/>$redis-&gt;hSetNx(&#039;test&#039;, &#039;key1&#039;, &#039;world&#039;);<br/>echo &quot;&lt;br&gt;&quot;;<br/>echo $redis-&gt;hget(&#039;test&#039;, &#039;key1&#039;);&nbsp;&nbsp; //结果：world<br/><br/>echo $redis-&gt;hlen(&#039;test&#039;);&nbsp;&nbsp; //结果：1<br/>var_dump($redis-&gt;hdel(&#039;test&#039;,&#039;key1&#039;));&nbsp;&nbsp;//结果：bool(true)<br/><br/>$redis-&gt;delete(&#039;test&#039;);<br/>$redis-&gt;hSet(&#039;test&#039;, &#039;a&#039;, &#039;x&#039;);<br/>$redis-&gt;hSet(&#039;test&#039;, &#039;b&#039;, &#039;y&#039;);<br/>$redis-&gt;hSet(&#039;test&#039;, &#039;c&#039;, &#039;z&#039;);<br/>print_r($redis-&gt;hkeys(&#039;test&#039;));&nbsp;&nbsp;//结果：Array ( [0] =&gt; a [1] =&gt; b [2] =&gt; c )<br/><br/>print_r($redis-&gt;hvals(&#039;test&#039;));&nbsp;&nbsp;//结果：Array ( [0] =&gt; x [1] =&gt; y [2] =&gt; z )<br/><br/>print_r($redis-&gt;hgetall(&#039;test&#039;));&nbsp;&nbsp;//结果：Array ( [a] =&gt; x [b] =&gt; y [c] =&gt; z )<br/><br/>var_dump($redis-&gt;hExists(&#039;test&#039;, &#039;a&#039;));&nbsp;&nbsp;//结果：bool(true)<br/><br/>$redis-&gt;delete(&#039;test&#039;);<br/>echo $redis-&gt;hIncrBy(&#039;test&#039;, &#039;a&#039;, 3);&nbsp;&nbsp;&nbsp;&nbsp;//结果：3<br/>echo $redis-&gt;hIncrBy(&#039;test&#039;, &#039;a&#039;, 1);&nbsp;&nbsp;&nbsp;&nbsp;//结果：4<br/><br/>$redis-&gt;delete(&#039;test&#039;);<br/>var_dump($redis-&gt;hmset(&#039;test&#039;, array(&#039;name&#039; =&gt;&#039;tank&#039;, &#039;sex&#039;=&gt;&quot;man&quot;))); //结果：bool(true)<br/>print_r($redis-&gt;hmget(&#039;test&#039;, array(&#039;name&#039;, &#039;sex&#039;)));&nbsp;&nbsp;//结果：Array ( [name] =&gt; tank [sex] =&gt; man )<br/><br/>$redis-&gt;hSet(&quot;hashA&quot;, &quot;name&quot;, &quot;iname&quot;);<br/>$redis-&gt;hSet(&quot;hashA&quot;, &quot;age&quot;, &quot;age&quot;);<br/><br/>// 同时设置多个值<br/>$redis-&gt;hMset(&quot;hashA&quot;, [<br/>&nbsp;&nbsp;&nbsp;&nbsp;&quot;gender&quot; =&gt; &quot;male&quot;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&quot;salary&quot; =&gt; 12000<br/>]);<br/>$redis-&gt;hGet(&quot;hashA&quot;, &quot;salary&quot;);<br/><br/>// 获得多个值<br/>var_dump($redis-&gt;hMGet(&quot;hashA&quot;, [&quot;name&quot;, &quot;gender&quot;]));<br/>?&gt;<br/><br/><br/><br/><br/>php redishash.php <br/>hello&lt;br&gt;hello&lt;br&gt;world1int(1)<br/>Array<br/>(<br/>&nbsp;&nbsp;&nbsp;&nbsp;[0] =&gt; a<br/>&nbsp;&nbsp;&nbsp;&nbsp;[1] =&gt; b<br/>&nbsp;&nbsp;&nbsp;&nbsp;[2] =&gt; c<br/>)<br/>Array<br/>(<br/>&nbsp;&nbsp;&nbsp;&nbsp;[0] =&gt; x<br/>&nbsp;&nbsp;&nbsp;&nbsp;[1] =&gt; y<br/>&nbsp;&nbsp;&nbsp;&nbsp;[2] =&gt; z<br/>)<br/>Array<br/>(<br/>&nbsp;&nbsp;&nbsp;&nbsp;[a] =&gt; x<br/>&nbsp;&nbsp;&nbsp;&nbsp;[b] =&gt; y<br/>&nbsp;&nbsp;&nbsp;&nbsp;[c] =&gt; z<br/>)<br/>bool(true)<br/>34bool(true)<br/>Array<br/>(<br/>&nbsp;&nbsp;&nbsp;&nbsp;[name] =&gt; tank<br/>&nbsp;&nbsp;&nbsp;&nbsp;[sex] =&gt; man<br/>)<br/>array(2) &#123;<br/>&nbsp;&nbsp;[&quot;name&quot;]=&gt;<br/>&nbsp;&nbsp;string(5) &quot;iname&quot;<br/>&nbsp;&nbsp;[&quot;gender&quot;]=&gt;<br/>&nbsp;&nbsp;string(4) &quot;male&quot;<br/>&#125;<br/>来自：http://blog.csdn.net/qjwcn/article/details/45293035
]]>
</description>
</item><item>
<link>https://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [实践Ok]Redis学习手册(Hashes数据类型)，以及PHP代码如何操作Redis的Hash实现。]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>