Skip to content

Instantly share code, notes, and snippets.

@mwidmann
Created February 19, 2018 14:45
Show Gist options
  • Save mwidmann/478b6b1b2b316f926dd9770f146f888a to your computer and use it in GitHub Desktop.
Save mwidmann/478b6b1b2b316f926dd9770f146f888a to your computer and use it in GitHub Desktop.
<?php
echo "Loading autoloader...";
require '/opt/app-root/src/vendor/autoload.php';
echo "Registering predis...";
Predis\Autoloader::register();
echo "Creating client...";
// Parameters passed using a named array:
$client = new Predis\Client([
'host' => '**DNS**',
'port' => **PORT**,
'password' => '**PASSWORD**'
]);
echo "Setting value...";
$value = $client->set('test','testie');
echo "Getting value...";
$value = $client->get('test');
echo "done";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment