PHP code example of dbx123 / php-minifier
1. Go to this page and download the library: Download dbx123/php-minifier 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/ */
dbx123 / php-minifier example snippets
$minified_html = PHPMin\Minify::html($any_html);
$minified_css = PHPMin\Minify::css($any_css);
$minified_js = PHPMin\Minify::js($any_js);
$html = file_get_contents("http://en.wikipedia.org/wiki/Minification_%28programming%29");
$minified_html = PHPMin\Minify::html($html);
// a 9.38% performance boost - in 3 lines of code!!
composer