Stripping Comments from Prod Framework

Hi guys, is there a way to easily strip out all comments (and un-ncesessary spaces and linebreaks for that matter) out of the production version of the framework. The reason I want to do this is that the framework is quite heavily documented in the comments, which is good, but that’s not so good when PHP is parsing the files even with opcode caching where it would only happen once (although in my case I would be using without opcode caching). I know there’s yiilite, but I would prefer to just strip un-necessary stuff out of the entire framework if I could.

I am pretty new here, too, but I believe you can do that easily by editing index.php in the root directory of your project and changing line #4 from this:


to this:


Sorry, I overlooked the last sentence of your question when I replied. There’s no easy way I know of to do that.


Interesting, didn’t know PHP has a feature for that. Even though i also doubt that you’ll see any effect. I like that quote: