1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- require 'SharedConfigurations.php';
- $client = new Predis\Client($single_server + array('iterable_multibulk' => true));
- $client->hmset('metavars', array('foo' => 'bar', 'hoge' => 'piyo', 'lol' => 'wut'));
- foreach ($client->hgetall('metavars') as $index => $item) {
- echo "[$index] $item\n";
- }
- foreach ($client->hgetall('metavars')->asTuple() as $index => $kv) {
- list($key, $value) = $kv;
- echo "[$index] $key => $value\n";
- }
|