PHP 8.1 RFC: fsync()
function
fsync() function | |
New Feature | |
PHP 8.1 | |
Implemented | |
New fsync and fdatasync functions |
RFC Vote: fsync()
function
>= 2/3 | |
Yes: 30No: 1 |
fsync()
is a function similar to fflush()
, however where fflush()
only instructs the application to flush its internal buffers out to the OS, fsync()
further instructs the OS to flush its buffers to physical storage, ensuring a completed and persisted write before returning any success. PHP provides plain stream wrappers for most common file system functions inherited from C and is indeed one of few major languages to not provide any interface to fsync
. This RFC proposes implementing fsync
in core.