The set_file_buffer() function sets the buffer size of an open file.
Output using fwrite() is normally buffered at 8K. So, if two processes writes to the same file, each will write up to 8K before pausing, and allow the other to write. If buffer is 0, write operations are unbuffered (meaning that the first write process will be completed before allowing other processes to write).
This function returns 0 on success, otherwise it returns EOF.
|file||Required. Specifies the open file|
|buffer||Required. Specifies the buffer size in bytes|
Tip: This function is an alias of stream_set_write_buffer().
Create an unbuffered stream:
Your message has been sent to W3Schools.