title: Exploding an array within a foreach loop parameter
body: <pre><code>foreach(explode(',' $foo) as $bar) { ... }
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>$test = explode(',' $foo);
  foreach($test as $bar) { ... }
  </code></pre>
  
  <p>In the first example, does it <code>explode</code> the <code>$foo</code> string for each iteration or does PHP keep it in memory exploded in its own temporary variable? From an efficiency point of view, does it make sense to create the extra variable <code>$test</code> or are both pretty much equal?</p>