PHP » GoLang |
login |
register |
about
|
GoLang Ds\Vector::filter
request it (609)
GoLang replacement for PHP's Ds\Vector::filter
[edit | history]
Ds\Vector::filter(PECL ds >= 1.0.0) Ds\Vector::filter — Creates a new vector using a callable to determine which values to include DescriptionCreates a new vector using a callable to determine which values to include. Parameters
Return Values
A new vector containing all the values for which
either the ExamplesExample #1 Ds\Vector::filter() example using callback function
<?phpThe above example will output something similar to:
object(Ds\Vector)#3 (2) {
[0]=>
int(2)
[1]=>
int(4)
}
Example #2 Ds\Vector::filter() example without a callback function
<?phpThe above example will output something similar to:
object(Ds\Vector)#2 (3) {
[0]=>
int(1)
[1]=>
string(1) "a"
[2]=>
bool(true)
}
|
more
Most requested
more
Last requests
|