title: PHP generator return type
body: <p>I've never used generators in PHP before and there are no examples in the <a href="https://secure.php.net/manual/en/language.generators.syntax.php" rel="noreferrer">documentation</a> that show the return type declaration.</p>
  
  <p>In PhpStorm, there is an error in the IDE when I do this:</p>
  
  <pre><code>public function getDataIncrementally(): void {
      yield from [/* some large set of numbers*/];
  }
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>Generators may only declare a return type of Generator, Iterator or Traversable, or iterable, void is not permitted.</p>
  </blockquote>
  
  <p>I can see the inheritance tree is <code>Traversable</code> -> <code>Iterator</code> -> <code>Generator</code>. Meanwhile, <a href="https://secure.php.net/manual/en/language.types.iterable.php" rel="noreferrer"><code>iterable</code></a> is a new pseudo-type introduced in PHP 7.1.</p>
  
  <p>Would it be appropriate to use <code>iterable</code> for the return type declaration if I only need to support PHP >= 7.1?</p>