PHP Classes

PHP Minify HTML CSS JS: Compress Web files removing unnecessary text

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 239 All time: 8,044 This week: 488Up
Version License PHP version Categories
php-minify-class 1.0.0MIT/X Consortium ...5HTML, PHP 5, Text processing, Compres...


This class can compress Web files removing unnecessary text.

It can take as parameters names of files typically used in Web applications like HTML, CSS and JavaScript.

The class can compress the files by removing unnecessary text data like spaces, tabs, line breaks and comments. Then it returns a string with the text of the files after being compressed this way.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq is available for providing paid consulting. Contact Muhammad Umer Farooq .
Classes: 52 packages by
Country: Pakistan Pakistan
Age: 22
All time rank: 84411 in Pakistan Pakistan
Week rank: 280 Up6 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x



require_once 'classes/Minify.php';

$minify = new Minify();
$file = $minify->htmlMinify('test.html');
//$file = $minify->cssMinify("boostrap.css");
//$file = $minify->javascriptMinify("jsfile");
/* OR */
//$code = $minify->htmlMinify($code,"code");
//$code = $minify->cssMinify($code,"code")
//$code = $minify->javascriptMinify($code,"code")
/* These three functions support two arguments
First file or code,
second type default is file if you passed code so you should passed code in first argument


PHP Minify Class

Minify your code commpress the size, increased speed


- Minify HTML - Minify CSS - Minify JavaScript

  Files folder image Files  
File Role Description
Files folder imageclasses (1 file)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENCE Lic. License text
Accessible without login Plain text file Data Read me
Accessible without login Plain text file test.html Data Sample HTML file

  Files folder image Files  /  classes  
File Role Description
  Plain text file Minify.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,044
This week:488Up