📅  最后修改于: 2022-03-11 14:54:02.040000             🧑  作者: Mango
$a = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
$p = 5;
$r = array_filter($a, function($i) use ($p) { return $i < $p; });
print_r($r);