I\'m using gzip to compress my html/php files along with js/css/etc. This reduces the payload quite nicely but I also want to \'minify\' my markup of both .html and .php pag
Peter Anselmo has confused minification for obfuscation. In code obfuscation the code is minified and variables are renamed to shortest length arbitrary names. Minification is merely the practice of reducing code size, such as white space removal, without altering the values, names, or syntax of code.
Peter Anselmo is also wrong that minifying markup results in an insignificant savings. This page, for instance, shows a savings of 18.31% and it was pretty tidy to begin with. Clearly, he has never tested his opinion before he put it out there. You can see the cost savings yourself using the Pretty Diff tool at http://prettydiff.com/
You can attempt to reverse engineer minification engine used by Pretty Diff to execute from PHP. That code and accompanied documentation can be found at: prettydiff.com/markupmin.js