I can't count the times that references have caused wierd errors in my PHP code. Definitely a good recommendation.
foreach ($array as & $ref) {
// Do something with $ref
} unset ($ref);
i.e. put the `unset()` call on the same line as the closing brace, forever "welding" it to that block.