title: How does in_array check if an object is in an array of objects?
body: <p>Does <code>in_array()</code> do object comparison where it checks that all attributes are the same?
  What if <code>$obj1 === $obj2</code>, will it just do pointer comparison instead?</p>
  
  <p>I'm using an ORM, so I'd rather loop over the objects testing if <code>$obj1-&gt;getId()</code> is already in the array if it does object comparison. If not, <code>in_array</code> is much more concise. </p>