PHP Do-While Versus the While Loop

May 21st, 2008

Well today I happened to be looking at some very old PHP code. It was done in PHP 4, but that really doesn’t matter. Anyways, when I was going through the code I noticed that the original coder had written dozens and dozens of do-while loops. I don’t do any “do-while” loops mainly out of personal preference. I do “regular while” loops mainly for the reason that they feel more practical to me. More will be explained below regarding this; However, it got me thinking today and I had to ask myself this question: Which loop would load faster?
(more…)