title: How can I create a usort function php to list array an compare arrays
body: <p>I am still learning php I would like to discover how can I create a function compare and list using usort() for this array and debug render for phpunit?</p>
  
  <pre><code>// create an array with names to be sorted
  $names = array('a', 'b', 'c');
  
  // render the sorted names
  $example = new \Example($names);
  $example-&gt;renderNamesSorted();
  
  function sortedNames (){
  
  }
  function renderNamesSorted (){
  
  }
  </code></pre>
  
  <p>My actual output on php unit is </p>
  
  <pre><code>Failed asserting that two arrays are equal.
  Array (
       0 =&gt; 'a'
  -    1 =&gt; 'b'
  -    2 =&gt; 'c'
  +    1 =&gt; 'c'
  +    2 =&gt; 'b'
   )
  </code></pre>
  
  <p>I would like create a function to compare and avoid not equal value in output phpunit</p>
  
  <p>Any ideas? thanks</p>