PHP code example of iliaal / lchash
1. Go to this page and download the library: Download iliaal/lchash 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/ */
iliaal / lchash example snippets
lchash_create(int $n_entries): bool
lchash_destroy(): bool
lchash_insert(string $key, string $value): bool
lchash_find(string $key): string|false
$lc = new LcHash(int $n_entries = 1048576);
$lc[$key] = $value; // write_dimension, last writer wins
$value = $lc[$key]; // read_dimension, returns null on miss
isset($lc[$key]); // has_dimension
unset($lc[$key]); // unset_dimension