PHP code example of t1st3 / php-json-minify
1. Go to this page and download the library: Download t1st3/php-json-minify 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/ */
t1st3 / php-json-minify example snippets
1st3\JSONMin\JSONMin as jsonMin;
// Use static method
$a = jsonMin::minify('{"a": "b"}');
echo $a;
// get the minified JSON in a string
$b = new jsonMin('{"c": "d"}');
echo $b->getMin();
// prints the minifed JSON
$c = new jsonMin('{"e": "f"}');
$b->printMin();
php --help
php composer.phar install -v