Google just released Closure, which is a compiler to minify JavaScript.
On the product site, it says \"The Closure Compiler has also been integrated with Page Speed\".>
Use the closure compiler with PHP (hosted via CURL or local via command line tool)
http://bohuco.net/blog/2009/11/google-closure-compiler-with-php/