JSMin PHP Extension
There are a number of implementations of jsmin available, and most are based on Douglas Crockford's jsmin.c. This implmentation is no different.
InstallationDownload the source, then run the following commands:
tar zxf php-jsmin-1.0.tgz cd php-jsmin-1.0 phpize sh ./configure make make install (optional) in php.ini add the following line: extensions=jsmin.so
Once you have the extension installed, restart Apache (if you've modified your php.ini file). Now in PHP, you'll have a native function named "jsmin()" defined as: