On the PHP-Coding-Practices.com blog, there's a tutorial posted from Tim Koschuetzki in his "Composing Methods" series looking at assigning temporary variables.
When you have the same temporary variable assigned to more than once, split it up into two, unless it is a loop variable. [...] Temporary variables have various uses. They can be used as counters in loops, as collecting variables building up a result or as simple containers containing the result of a long-winded expression for easy reference.
He offers suggestions of using temporary variables, including changing references of it after use and making a new temp variable following the second assignment of the first one. Some sample code is included to illustrate the points made.