stream_copy_to_stream()
stream_copy_to_stream - Copies data from one stream to another
Syntax
int stream_copy_to_stream (
resource $source,
resource $dest,
int $maxlength,
int $offset)
Arguments
- source - The source stream
- dest - The destination stream
- maxlength - Maximum bytes to copy
- offset - The offset where to start to copy data
Description
Makes a copy of up to maxlength bytes of data from the current position (or from the offset position, if specified) in source to dest. If maxlength is not specified, all remaining content in source will be copied.
Version
PHP 5
Return value
Returns the total count of bytes copied.