phpstreams\Stream::toArray PHP Method

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);
    }