public static function copy(StreamInterface $src, StreamInterface $dest)
    {
        if ($src->isSeekable()) {
            $src->rewind();
        }

        while (!$src->eof()) {
            $dest->write($src->read(4096));
        }
    }
public static function copy(StreamInterface $src, StreamInterface $dest)
    {
        if ($src->isSeekable()) {
            $src->rewind();
        }

        while (!$src->eof()) {
            $dest->write($src->read(4096));
        }
    }
public static function copy ( StreamInterface $ src , StreamInterface $ dest ) { if ( $ src -> isSeekable ( ) ) { $ src -> rewind ( ) ; } while ( ! $ src -> eof ( ) ) { $ dest -> write ( $ src -> read ( 4096 ) ) ; } }
Copy stream to another stream.

@param   StreamInterface $src  Source stream.
@param   StreamInterface $dest Target stream.

@return  void
Copy stream to another stream .