PHP code example of divineomega / json-key-value-store

1. Go to this page and download the library: Download divineomega/json-key-value-store 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/ */

    

divineomega / json-key-value-store example snippets


use DivineOmega\JsonKeyValueStore\JsonKeyValueStore;

$store = new JsonKeyValueStore('store.json.gz');

$store->set('key1', 'value123');
$store->set('key2', 'value456');
$store->delete('key2');

$value = $store->get('key1');

// $value = 'value123'