Cannot find STRICT needle in multi-dim array
<p>I have a snippet of code that looks like so:</p>

<pre><code>if(array_key_exists('uid',$_SESSION)){
     $userdata-&gt;readUser($_SESSION['uid']); 
     $ACL = new ACL($_SESSION['uid']);
     $userPerms = $ACL-&gt;setACL();
     if(!in_array_r("adminUI",$userPerms['perms'],true)){
        echo "Couldnt fine adminUI in:";
         var_dump($userPerms['perms']); 
     }
}
</code></pre>

<p>And the in_array_r function is:</p>

<pre><code>function in_array_r($needle, $haystack, $strict = false) {
    foreach ($haystack as $item) {
        if (($strict ? $item === $needle : $item == $needle) || (is_array($item) &amp;&amp; in_array_r($needle, $item, $strict))) {
            return true;
        }
    }

    return false;
}
</code></pre>

<p>Which I got from: <a href="http://stackoverflow.com/questions/4128323/in-array-and-multidimensional-array">in_array() and multidimensional array</a></p>

<p>However the output of this shows:</p>

<pre><code>Couldnt fine adminUI in:
array(2) {
  [0]=&gt;
  array(1) {
    ["perm_desc"]=&gt;
    string(7) "adminUI"
  }
  [1]=&gt;
  array(1) {
    ["perm_desc"]=&gt;
    string(9) "apiAccess"
  }
}
</code></pre>

<p>If i change the function to check the array without STRICT it will find the needle, but FAILS on strict check...</p>

<p>I'm beating my head into the desk trying to figure this one out.</p>

<p><strong>EDIT</strong></p>

<p>Jan Schejbal was awesome enough to point out that this code works perfectly fine. I was not coherent enough to realize my working directory. Thank you again Jan Schejbal.</p>
