PHP IF Evaluation & Server Overhead

undoIT

New Member
How much server overhead there is when PHP if statements are evaluated, i.e. memory consumption and CPU usage? I've searched around and didn't find anything that definitively answered this question.

For example, if I have a WordPress blog and use a lot of if statements for each post summary on the home page, is this going to require a lot more server resources if the home page starts getting high traffic? And on pages where many posts are listed (i.e. category pages) , it seems like this could become an issue.

Or, is this something I shouldn't even be worrying about?
 

conor

New Member
I can't give you a definite answer but I know a company that hosted 200 low traffic websites on 6GB RAM.

They separated of the high volume sites like ones with 5,000+ hits a day would have their own machine with 1GB RAM.
 

zkiller

Super Moderator
Staff member
There really isn't a definitive answer to your question. It really depends on the complexity of the code in it's entirety, but your basic if statement is hardly worth mentioning.
 
Top