array_filter迭代数组中每个元素到一个自定义函数,保留返回true的值到一个新的结果数组中。
/**
* Iterates over each value in the <b>array</b>
* passing them to the <b>callback</b> function.
* If the <b>callback</b> function returns true, the
* current value from <b>array</b> is returned into
* the result array. Array keys are preserved.
* @link https://php.net/manual/en/function.array-filter.php
* @param array $input <p>
* The array to iterate over
* </p>
* @param callback $callback [optional] <p>
* The callback function to use
* </p>
* <p>
* If no callback is supplied, all entries of
* input equal to false (see
* converting to
* boolean) will be removed.
* </p>
* @param int $flag [optional] <p>
* Flag determining what arguments are sent to <i>callback</i>:
* </p><ul>
* <li>
* <b>ARRAY_FILTER_USE_KEY</b> - pas