PHP streamWrapper stream_lock() Method
The PHP streamWrapper::stream_lock() method is used to lock or release a file. This method is called in response to flock(), when file_put_contents() (when flags contains LOCK_EX), stream_set_blocking() and when closing the stream (LOCK_UN).
Syntax
public streamWrapper::stream_lock(operation)
Parameters
operation |
Required. operation can be one of the following:
|
Return Value
Returns true on success or false on failure.
Exceptions
Emits E_WARNING if call to this method fails (i.e. not implemented).
❮ PHP Streams Reference