Reputation: 3118
I can understand that by minifing js code will reduce its size and will be helpful for sending over the network but will it be useful to minify php?
also how obfuscation will be helpful in execution in php?
Upvotes: 2
Views: 1221
Reputation: 6532
Minifying php is pointless from a network bandwidth perspective, minifying the output of the php might be beneficial however as the html that is output is transmitted. The original php will be hard to maintain if it's minified. Which is also the point of obsfucation. If someone gets hold of your php, then it will prevent them knowing what it does without more effort...
Upvotes: 5
Reputation: 8616
It is only (very slightly) useful if you intent to distribute your PHP while still retain some control... however obfuscating PHP is largely pointless as even in a obscured state any decently experienced person will be able to easily work it out.
Upvotes: 1
Reputation: 16304
Minifying to php code doesn't really speed up the server parsing and executing the php scripts.
To speed up websites I recommend having a look at YSlow.
Upvotes: 0
Reputation:
Neither minification nor obfuscation will improve execution of a php script. What are you looking for is Optimization.
Upvotes: 3
Reputation: 50974
so No and No
Upvotes: 1
Reputation: 490423
PHP code is (generally) not transmitted over HTTP (unlike CSS, JavaScript & HTML) so minifying it would be pointless, not to mention making your code unnecessarily unreadable.
Upvotes: 3