I have a relatively simple function which uses a `foreach`

```
function foo($t) {
     $result;
     foreach($t as $val) {
         $result = dosomething($result, $val);
     }
     return $result;
}

```

I would like to type hint, and [`Traversable`](http://www.php.net/manual/en/class.traversable.php) seems to be the exact type hint I need

```
 function foo(Traversable $t) {

```

However this gives a `E_RECOVERABLE_ERROR` when using an array (which is of course usable in a `foreach`): [example](http://phpfiddle.org/main/code/xc1-arr)

```
 Argument 1 passed to foo() must implement interface Traversable, array given

```

Is there a way to type hint or is this not possible?