Microsoft assumes you have infinite CPU cycles and resources. They believe that bad code always stays for reverse compatibility and good code becomes an additional "feature." They generally load libraries just in case they "might" use them. They then let the compiler sort it out and everyone can see the overall result. Please do not encourage bad software "because they can take it." That is talking like a Vaseline salesperson.
This question is about best practices. Keep it simple. CodeCode that is easy to translate to pseudo-code is better. This is evidenced by the examples above. Which takes longer to say?
"Start php, do this 30 times:, then stop php. Print this. Start php, print this, stop php. Print this. Start php, print this, stop php.Print this. Start php, print this, stop php. Print this. Start php, print this, stop php.Print this. Start php, print this, stop php. Print this. Start php, print this, stop php.Print this. Start php, print this, stop php..."
"Start php, do this 30 times: print this, then add this to that, then add this to that, then add this to that, then add this to that, then add this to that, then add this to that..."
"Start php, do this 30 times: print this, print this, print this, print this, print this, print this, print this..."
Personally I would do:
"Start php, define this, do this 30 times: add this to that. Print."
A technical explanation about how the interpreter works and why one way is faster than another is irrelevant for a newbie. It is best just to know the rules of thumb:
- Simpler is better.
- If it doesn't fit on a single page then it is doing too much (break it down).
- If you cannot hand-write the pseudo-code on an index card, it is too complex.
Use more tags if the overall result is simpler. Period.