dlublink Posted February 2, 2011 Share Posted February 2, 2011 Hello, So I am trying to reduce my memory footprint to the lowest possible value without sacrificing functionality. I noticed that if I write a comment that is 2kb long, it costs me 2kb more memory to run the script. How can I get PHP to free the memory taken up by comments? It seems like it would be a real pain in the butt to have to run php -w on all my source files each time I update my server. Any ideas? Thanks. David Quote Link to comment https://forums.phpfreaks.com/topic/226482-memory-usage-from-php-comments/ Share on other sites More sharing options...
ChemicalBliss Posted February 2, 2011 Share Posted February 2, 2011 you could use a php script to remove any and all comments (and even compress your code) for a production environment. Keep your original source code in case you want to change/add/remove or play with something in the code. Quote Link to comment https://forums.phpfreaks.com/topic/226482-memory-usage-from-php-comments/#findComment-1169122 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.