Toggle navigation
Hot Examples
DE
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Suchen
Home
phpstreams
Stream
filter
phpstreams\Stream::filter PHP Method
Stream Class Documentation
Datei anzeigen
Open project: bertptrs/phpstreams
filter()
public
method
Note that filter, like most stream operations, preserves the key => value relationship throughout its execution. That means that there will be missing keys, if you started with a regular array.
public
filter
(
callable
$filter
) :
Stream
$filter
callable
return
Stream
a new stream yielding only the elements for which the callback returns true.
public function filter(callable $filter) { return new FilterOperation($this, $filter); }
Stream
__construct
all
any
collect
count
distinct
filter
flatMap
getIterator
isSorted
isValidSource
limit
map
reduce
skip
sorted
toArray