IPHP_REDIS type combination uses
I. Type combination description
After the introduction of the previous article, I already know that Redis has built -in data types such as string, collection, list, and hash.
Here we take an unordered set as an example to illustrate.
1. From the diagram, you can see that set1 contains four elements, namely A, B, C, D
2. Based on previous understanding , the elements of the collection are of a single type. Generally, they are of string type. So, what if the elements of the collection are of other types? What about list, hash or collection? Does redis also support it?
2. Verification type combination use
1. Source code example
2. In the example, collection type1, stores one element, and the element is a list type
3. Verification results
Browser access to see
redis terminal to see
Attached:
The source code download address of this document
php_redis Chinese user manual
Copyright statement: This article is an original article by the blogger and may not be reproduced without the permission of the blogger.The above introduces the use of Xiaobei_php+redis type combination, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.