title: Get second to last value in array
body: <p>I'm frequently using the following to get the second to last value in an array:</p>
  
  <pre><code>$z=array_pop(array_slice($array,-2,1));
  </code></pre>
  
  <p>Am I missing a php function to do that in one go or is that the best I have?</p>