PHP code example of sergeym0615 / memcached-lib

1. Go to this page and download the library: Download sergeym0615/memcached-lib library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sergeym0615 / memcached-lib example snippets


use MemcachedLib\MemcahedLib;

#Default
$memcached = new MemcachedLib();

#Custom host and port
$host = '127.0.0.1';
$port = 11211
$memcached = new MemcachedLib($host, $port);

$memcached->set( string $key , mixed $value [, int $time ] );

$data = $memcached->get(string $key);

$memcached->delete(string $key);