http://joliclic.free.fr/php/javascript-packer/en/
http://yuiblog.com/blog/2008/07/16/combohandler/
This is a fast, low-overhead port of Douglas Crockford’s JSMin JavaScript minifier to PHP. It requires PHP 5 or higher.
JSMin is a filter which removes comments and unnecessary whitespace from JavaScript files.
http://code.google.com/p/jsmin-php/