1. Go to this page and download the library: Download nabeghe/mem 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/ */
nabeghe / mem example snippets
// Checks if a key exists in a cache group.
Mem::has(mixed $key, mixed $group = 'default'): bool
// Returns the first key of an item that matches the regex.
Mem::match($regex, $group = 'default'): ?string
// Returns items whose keys match the regex.
Mem::matches($regex, $group = 'default'): ?array
// Checks if a group exists.
Mem::hasGroup(mixed $group): bool
// Returns the value of a key from a group.
Mem::get(mixed $key, mixed $group = 'default', mixed $default = null): bool
// Changes the value of a key in a group.
Mem::set(mixed $key, mixed $value, mixed $group = 'default'): bool
// Deletes a key from a group.
Mem::del($key, $group = 'default'): bool
// Deletes items based on key matching with regex.
Mem::delMatches($regex, $group = 'default'): bool
// Returns all storages (groups) and their keys.
Mem::all(): array
// Returns all keys and values of a group.
Mem::group($group = 'default'): Storage
// Returns the number of existing groups.
Mem::groupsCount(): int
// Clears the entire group.
Mem::drop($group = 'default'): bool
// Clears the entire cache.
Mem::reset(): bool