Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
phpstreams
Stream
toArray
phpstreams\Stream::toArray PHP Method
Stream Class Documentation
Show file
Open project: bertptrs/phpstreams
toArray()
public
method
Convert this stream to an array.
public
toArray
(
boolean
$withKeys
= true ) :
array
$withKeys
boolean
[optional] if false, return a simple array containing all values in order. If true (the default) preserve keys.
return
array
An (associative) array of the contents of the stream.
public function toArray($withKeys = true) { return iterator_to_array($this, $withKeys); }
Stream
__construct
all
any
collect
count
distinct
filter
flatMap
getIterator
isSorted
isValidSource
limit
map
reduce
skip
sorted
toArray