is
Return array items that pass to the function test.
is(iterable $data, callable $fn);
Example:
$A = is([1, 2, 3, 4, 5], function($v, $k) {
return 3 !== $v && $v < 5;
});
Result:
$A = [
0 => 1,
1 => 2,
3 => 4
];
Helper functions.
is
Return array items that pass to the function test.
is(iterable $data, callable $fn);
Example:
$A = is([1, 2, 3, 4, 5], function($v, $k) {
return 3 !== $v && $v < 5;
});
Result:
$A = [
0 => 1,
1 => 2,
3 => 4
];