title: Why doesn't array_rand work when I request only one item?
body: <p>The following works properly:</p>
  
  <pre><code>&lt;?php
  $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
  $rand_keys = array_rand($input, 2);
  echo $input[$rand_keys[0]] . "\n";
  echo $input[$rand_keys[1]] . "\n";
  ?&gt;
  </code></pre>
  
  <p>But this doesn't:</p>
  
  <pre><code>&lt;?php
  $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
  $rand_keys = array_rand($input, 1);
  echo $input[$rand_keys[0]] . "\n";
  ?&gt;
  </code></pre>
  
  <p>Why isn't <code>array_rand</code> working when I request only one random index?</p>