AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
# partition方法 可以和 PHP 中的 `list()` 方法结合使用,来分开通过指定条件的元素以及那些不通过指定条件的元素。 ``` $collection = collect([1, 2, 3, 4, 5, 6]); list($underThree, $aboveThree) = $collection->partition(function ($i) { return $i < 3; }); ```