title: Merge array-of-array with specifics similar values
body: <p>Imagine that I have this array:</p>
  
  <pre><code>$users = [];
  $users[0] = [ "Name" =&gt; "John Doe", "Age" =&gt; 48, 
                "Email" =&gt; "john.doe@server-a.com", "Points" =&gt; 5 ];
  $users[1] = [ "Name" =&gt; "John Brother", "Age" =&gt; 32, 
                "Email" =&gt; "john.brother@server-a.com", "Points" =&gt; 8 ];
  $users[2] = [ "Name" =&gt; "John Doe", "Age" =&gt; 48, 
                "Email" =&gt; "john.doe@server-b.com", "Points" =&gt; 3 ];
  $users[3] = [ "Name" =&gt; "John Doe", "Age" =&gt; 49, 
                "Email" =&gt; "john.doe@server-b.com", "Points" =&gt; 7 ];
  </code></pre>
  
  <p>In my code, I need merge users when (Same Name + Same Age) or (Same Email), to sum points and return a unique copy of this user, considering the most newer information of this user, if merged.</p>
  
  <p>So, note that:</p>
  
  <ul>
  <li><code>User#0</code> can merge with <code>User#2</code>, because it share (Same Name + Same Age);</li>
  <li>But <code>User#0</code> can't merge <em>directly</em> with <code>User#3</code>, because of they don't have similarity;</li>
  <li><code>User#2</code> can merge with <code>User#3</code>, because it share (Same Email);</li>
  <li>So, indirectly, <code>User#0</code> <strong>CAN</strong> merge with <code>User#3</code> and <code>User#2</code>;</li>
  </ul>
  
  <p>The result expected is:</p>
  
  <pre><code>$users[] = [ "Name" =&gt; "John Brother", "Age" =&gt; 32, 
               "Email" =&gt; "john.brother@server-a.com", "Points" =&gt; 8 ];
  $users[] = [ "Name" =&gt; "John Doe", "Age" =&gt; 49, 
               "Email" =&gt; "john.doe@server-b.com", "Points" =&gt; 15 ];
  </code></pre>
  
  <p><strong>Note</strong>: the <code>User#ID</code>, after merge, doesn't matter.</p>