flock()
function flock(resource $stream, int $operation, bool $would_block = null): bool
Portable advisory file locking.
Parameters:
$stream(resource)$operation(int)$would_block(bool), passed by reference, defaultnull, optional
Returns: bool
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/filesystem/flock.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how flock is implemented in the compiler, see the internals page.