title: Why is this mongo sort not working in PHP?
body: <p>I'm following an example from the PHP docs to sort some records in a collection:</p>
  
  <pre><code>    $cursor = $mongo-&gt;party_scores-&gt;find()-&gt;limit(10);
      $cursor = $cursor-&gt;sort(array("score",-1));
      foreach($cursor as $doc) {
          print_r($doc);
      }
  </code></pre>
  
  <p>Doing this, I see the documents in a random order (not sorted).</p>
  
  <p>But executing this query from the mongo console produces a correctly sorted response:</p>
  
  <pre><code>db.party_scores.find().sort({score : -1 })
  </code></pre>
  
  <p>I feel like there must be something obvious I'm missing.</p>