Converting Javascript function into a PHP function
<p>I am new to PHP and I'm trying to convert a simple Javascript function into a PHP function.  So far I know to only convert the variables,  I need help with the sort function and array filter.  Thanks for any help!</p>

<pre><code>var closeRoll = function( number ) {
  var rollArray = [36, 48, 60, 72];
  var closest = rollArray.filter(function(ele){
    return ele - number &gt;= 0
  }).sort()[0];
  return closest;   
};
</code></pre>

<p>My half conversion:</p>

<pre><code>function closeRoll( $number ) { 
  $rollArray = Array(36, 48, 60, 72);
  $closest = array_filter( $rollArray, function temp( $rollArray ) {
    return $rollArray - $number &gt;= 0;
  }); //.sort()[0];
  return $closest;   
};
</code></pre>
