Flush

The flush() method can be used to write all buffered output to the open file.

$stream = FileStream::open('persons.txt', 'r+b')
    ->put($data)
    ->flush();

PHP's fflush()open in new window is used to perform the flush operation.