title: compare two PHP arrays by key
body: <p>What's the fastest way to compare if the keys of two arrays are equal?</p>
  
  <p>for eg.</p>
  
  <pre><code>array1:          array2:
  
  'abc' =&gt; 46,     'abc' =&gt; 46,
  'def' =&gt; 134,    'def' =&gt; 134,
  'xyz' =&gt; 34,     'xyz' =&gt; 34, 
  </code></pre>
  
  <p>in this case result should be TRUE (same keys)</p>
  
  <p>and:</p>
  
  <pre><code>array1:          array2:
  
  'abc' =&gt; 46,     'abc' =&gt; 46,
  'def' =&gt; 134,    'def' =&gt; 134,
  'qwe' =&gt; 34,     'xyz' =&gt; 34, 
  'xyz' =&gt; 34,    
  </code></pre>
  
  <p>result should be FALSE (some keys differ)</p>
  
  <p>array_diff_key() returns a empty array...</p>