Define :
In this tutorial we have to learned about PHP set_file_buffer() Function.The set_file_buffer() function is inbuilt function in php. This function is used to sets the buffering for write operations on the given stream to buffer bytes.
set_file_buffer(stream, buffer)
stream |
Required. Specify the file pointer to truncate. The stream must be open for writing. |
buffer |
Required. Specify the number of bytes to buffer. If buffer is 0 then write operations are unbuffered. This ensures that all writes with fwrite() are completed before other processes are allowed to write to that output stream. |
Given below example demonstrates how to use this function to create an unbuffered stream:
Output : Changing the buffering successful.