in reply to foreach argument modification inside loop, followed by return from loop
I can't imagine it ever causing problems. It's really the iteration of the loop after the modification where foreach can get confused.