title: Iterable objects and array type hinting?
body: <p>I have a lot of functions that either have type hinting for arrays or use <code>is_array()</code> to check the array-ness of a variable. </p>
  
  <p>Now I'm starting to use objects that are iterable. They implement <code>Iterator</code> or <code>IteratorAggregate</code>. Will these be accepted as arrays if they pass through type hinting, or undergo <code>is_array()</code>? </p>
  
  <p>If I have to modify my code, is there a generic sort of <code>is_iterable()</code>, or must I do something like:</p>
  
  <pre class="lang-php prettyprint-override"><code>if ( is_array($var) OR $var instance_of Iterable OR $var instanceof IteratorAggregate ) { ... }
  </code></pre>
  
  <p>What other iterable interfaces are out there?</p>