fork(4) download
  1. <?php
  2. $arr = array(0=>12,1=>34,2=>334,3=>87,4=>75);
  3.  
  4. function less_than_85($value) {
  5. return $value < 85;
  6. }
  7.  
  8. $arr = array_filter($arr, "less_than_85");
  9. print_r($arr);
  10. ?>
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 12
    [1] => 34
    [4] => 75
)