PHPWee. A free, universal minifier for PHP
PHPWee is an open source minifier script for PHP. It allows CSS, JS and HTML to be reduced in file size by up to 30% without changing its meaning. It can even minify html code on-the-fly as php produces it. This allows websites to load faster, and in fewer http round trips.
PHPWee is unique in its smart minification of HTML code. It is HTML4, XHTML and HTML5 aware and tested. It also supports preserved whitespace for CDATA Elements such as pre textarea. It removes unneeded whitespace and comments (except IE conditional comments).
In contrast to 'bug-prone' RegEx based minifying attempts - PHPWee produces a validates and parses HTML DOM documents producing W3C compliant output wherever possible.
Performance
PHPWee has been tested on major, optimized websites the following results:
PHPWee can reduce the load time of less optimized, smaller websites up to 30% - and can be implemented in minutes.
Download
PHPWee is open source software with a permissive BSD license. You can use it n both free and commercial project at no cost, and can modify and update the code in agreement with the simple, plain english license terms. Download PHPWee.