This question refers to performance, not to file size.
I know there are "min" files for javascript and css, but what about optimizing PHP scripts. Of course you will want to keep a copy of the scripts in human readable format. However, for the version running on the production server, will it perform better if it is "optimized" by removing all of the unecessary space and newline / tab characters?
Any benchmarks on this?
This has already been discussed some via another question here that you might want to look at: php source code whitespace
Also, while I've never personally made use of it, there appears to be a command "php -w" which removes all whitespace and comments for you, should you want to go that route.
I would place money on the hypothesis that the tiny amount of extra work that the lexer needs to do in order to skip the whitespace is utterly negligible compared to the actual job of parsing interpreting the rest of the source code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With