I have started writing an API that loads, minifies and returns javascript files into one file using PHP. This is achieved by pointing to a PHP file
Faster as .js yes, but marginally. The reason being that it would be a static file so wouldn't need the processing time PHP will take.
That said there's nothing wrong with feeding JavaScript through PHP like this. You could even come up with caching methods as well to reduce the processing impact.