title: Check if something is an instance of ArrayCollection
body: <p>Usually you it is possible to check whether a variable is an instance of a class by using:</p>
  
  <pre><code>$foo instanceof bar
  </code></pre>
  
  <p>But in the case of ArrayObjects (belonging to Symfony 2), this does not seem to work</p>
  
  <p><code>get_class($foo)</code> returns <code>'Doctrine\Common\Collections\ArrayCollection'</code></p>
  
  <p>yet</p>
  
  <pre><code>$foo instanceof ArrayCollection
  </code></pre>
  
  <p>returns <code>false</code></p>
  
  <p><code>is_array($foo)</code> returns <code>false</code> and <code>$is_object($foo)</code> returns <code>true</code></p>
  
  <p>but I would like to do a specific check on this type</p>