Efficient JavaScript minification in pure PHP