SimpleSetAndGet.php 479 B

12345678910111213141516171819202122232425
  1. <?php
  2. /*
  3. * This file is part of the Predis package.
  4. *
  5. * (c) Daniele Alessandri <suppakilla@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. require 'SharedConfigurations.php';
  11. // simple set and get scenario
  12. $client = new Predis\Client($single_server);
  13. $client->set('library', 'predis');
  14. $retval = $client->get('library');
  15. var_dump($retval);
  16. /* OUTPUT
  17. string(6) "predis"
  18. */