JStream::write
File write
Whilst this function accepts a reference, the underlying fwrite will do a copy! This will roughly double the memory allocation for any write you do. Specifying chunked will get around this by only writing in specific chunk sizes. This defaults to 8192 which is a sane number to use most of the time (change the default with JStream::set('chunksize', newsize);) Note: This doesn't support gzip/bzip2 writing like reading does
Signature
public function write(&
$string,
[integer
$length = 0,
[integer
$chunk = 0]] )
Parameters
-
$string
-
$length
- Length of the string to write.
-
$chunk
- Size of chunks to write in.
Returns
- boolean