Skip to content

Instantly share code, notes, and snippets.

@jazeabby
Created May 16, 2020 19:23
Show Gist options
  • Save jazeabby/89aeda884b2caca7fbe999b64aa85470 to your computer and use it in GitHub Desktop.
Save jazeabby/89aeda884b2caca7fbe999b64aa85470 to your computer and use it in GitHub Desktop.
Memcached Test script for PHP
<?php
error_reporting(E_ALL & ~E_NOTICE);
$mc = new Memcached();
$mc->addServer("localhost", 11211);
$mc->set("foo", "Hello!");
$mc->set("bar", "Memcached...");
$arr = array(
$mc->get("foo"),
$mc->get("bar")
);
var_dump($arr);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment