Just found a PHP Benchmark page that can be helpful when writing PHP.
In most cases you don’t gain much if your writing a while-loop instead of a foreach, but you can gain some in bigger applications.
See PHP Benchmark results here: http://www.phpbench.com/ (Be aware that these results are live, so they will change in every refresh).