title: PHP - Remove duplicates from array of objects
body: <p>What would be the most efficient way of either removing dups or creating new array with no dups? Are there any built in PHP functions that save this manual removal?</p>
  
  <pre><code>[2013-05-27 22:35:55]: Array
  (
      [0] =&gt; stdClass Object
          (
              [type] =&gt; 1
              [val] =&gt; 1111
          )
  
      [1] =&gt; stdClass Object
          (
              [type] =&gt; 1
              [val] =&gt; 2222
          )
  
      [2] =&gt; stdClass Object
          (
              [type] =&gt; 1
              [val] =&gt; 1111
          )
  
      [3] =&gt; stdClass Object
          (
              [type] =&gt; 1
              [val] =&gt; 2222
          )
  )
  </code></pre>
  
  <p>Many thanks, Luke</p>