title: php array unique type check
body: <p>I am using <code>array_unique</code> to get rid of the duplicate values in an array. But, the problem is <code>array_unique</code> does not consider data types while checking for duplicates. For example:</p>
  
  <pre><code>$a = [1, true, null, false];
  $u = array_unique($a);
  var_dump($u);
  </code></pre>
  
  <p>Outputs:</p>
  
  <pre><code>array(2) {
    [0] =&gt;int(1)
    [2] =&gt;NULL
  }
  </code></pre>
  
  <p>But, if you consider data types every value of the array are unique. I know I can fix this by running a loop. But, is there a better way or an alternative to <code>array_unique</code> by which I can achieve this?</p>