title: PHP generator yield the first value, then iterate over the rest
body: <p>I have this code:</p>
  
  <pre><code>&lt;?php
  
  function generator() {
      yield 'First value';
      for ($i = 1; $i &lt;= 3; $i++) {
          yield $i;
      }
  }
  
  $gen = generator();
  
  $first = $gen-&gt;current();
  
  echo $first . '&lt;br/&gt;';
  
  //$gen-&gt;next();
  
  foreach ($gen as $value) {
      echo $value . '&lt;br/&gt;';
  }
  </code></pre>
  
  <p>This outputs:</p>
  
  <pre><code>First value
  First value
  1
  2
  3
  </code></pre>
  
  <p>I need the 'First value' to yielding only once. If i uncomment $gen->next() line, fatal error occured:</p>
  
  <p>Fatal error: Uncaught exception 'Exception' with message 'Cannot rewind a generator that was already run'</p>
  
  <p>How can I solve this?</p>