title: PHP Traversable type hint
body: <p>I have a relatively simple function which uses a <code>foreach</code></p>
  
  <pre><code>function foo($t) {
       $result;
       foreach($t as $val) {
           $result = dosomething($result, $val);
       }
       return $result;
  }
  </code></pre>
  
  <p>I would like to type hint, and <a href="http://www.php.net/manual/en/class.traversable.php" rel="noreferrer"><code>Traversable</code></a> seems to be the exact type hint I need</p>
  
  <pre><code> function foo(Traversable $t) {
  </code></pre>
  
  <p>However this gives a <code>E_RECOVERABLE_ERROR</code> when using an array (which is of course usable in a <code>foreach</code>): <a href="http://phpfiddle.org/main/code/xc1-arr" rel="noreferrer">example</a></p>
  
  <pre><code> Argument 1 passed to foo() must implement interface Traversable, array given
  </code></pre>
  
  <p>Is there a way to type hint or is this not possible?</p>