1. Go to this page and download the library: Download mattablues/radix-framework 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/ */
mattablues / radix-framework example snippets
declare(strict_types=1);
use Radix\File\Reader;
use Radix\File\Writer;
// Skriv JSON till fil
Writer::json(__DIR__ . '/data.json', [
'id' => 1,
'name' => 'Alice',
]);
// Läs tillbaka som assoc-array
$data = Reader::json(__DIR__ . '/data.json', assoc: true);
var_dump($data);
// ['id' => 1, 'name' => 'Alice']