I hope I don't post in wrong thread.
I want know should PHP code to be compressed like javascript code in live server for sake of optimization and faster processing of code?
If so, then I want to ask if anyone know the name of tool to compress PHP code?
Also I want to know too if I remove all comments from PHP code (/*..*/ or //), does it help optimizing the server processing too?
Does obsfucated PHP code would affect the performance of code?
Sorry for my bad english, I hope you understand what I am talking about,
Thanks in advance.
Should PHP code be compressed like javascript for live site?
Moderator: General Moderators
-
sermer8455
- Forum Newbie
- Posts: 1
- Joined: Wed Oct 08, 2008 4:06 am
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Should PHP code be compressed like javascript for live site?
Not sure about compressing php files but I always find its good practice to keep comments in php files on the remote site as well as local machine - otherwise you'll be face with ultimately different files and one will be overwrittend when editing.
Re: Should PHP code be compressed like javascript for live site?
I don't think there is anything to be gained by compressing server scripts. They are executed on the server, not sent over the Internet and not processed by the client browser. I can't imagine a server script that is so complex that the server's efficiency could be improved by such methods.