fork download
  1. <?php
  2.  
  3. $ar = array(0, 32, 64, 96, 128, 160, 192, 224);
  4.  
  5. $num = 44;
  6.  
  7. $range = min(array_filter($ar, function($i) use($num) {
  8. return $i > $num;
  9. }));
  10.  
  11. var_dump($range);
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
int(64)