PHP code example of shinjin / freezer

1. Go to this page and download the library: Download shinjin/freezer 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/ */

    

shinjin / freezer example snippets

 php
use Freezer\Storage\Pdo;

$storage = new Pdo(array('driver' => 'sqlite'));

$caveman = new class
{
    public $name        = 'Brendan';
    public $nationality = 'Canadian';
};

$id = $storage->store($caveman);

// wait 2 million years

$caveman = $storage->fetch($id);

print_r($caveman);

// class@anonymous Object
// (
//     [name] => Brendan
//     [nationality] => Canadian
// )