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 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. 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
Archived
This topic is now archived and is closed to further replies.