1. Go to this page and download the library: Download infinityloop-dev/utils 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/ */
infinityloop-dev / utils example snippets
$json = Json::fromString($jsonString); // (no decoding is done at this step)
$json['foo'] = 'bar'; // adding/updating values (decoding is done on this step)
unset($json['foo2']); // removing value
$json->foo3 = 'bar3; // oop interface is also available
$jsonString = $json->toString(); // (encoding of updated array into string again)
$jsonString = $json->toString(); // (no encoding is done, because previously encoded string is up to date)