PHPackages                             benconstable/lock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. benconstable/lock

AbandonedArchivedLibrary[File &amp; Storage](/categories/file-storage)

benconstable/lock
=================

Simple object-oriented file lock management

v1.0.2(11y ago)91.1k11MITPHPPHP &gt;= 5.3

Since Nov 16Pushed 11y ago1 watchersCompare

[ Source](https://github.com/BenConstable/lock)[ Packagist](https://packagist.org/packages/benconstable/lock)[ Docs](http://github.com/BenConstable/lock)[ RSS](/packages/benconstable-lock/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (1)

Lock
====

[](#lock)

[![Build Status](https://camo.githubusercontent.com/a0868e20b6545918dbf1021143abbfb25fbd175b242389dc90cd641a405291e5/68747470733a2f2f6170692e7472617669732d63692e6f72672f42656e436f6e737461626c652f6c6f636b2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/BenConstable/lock)[![Latest Stable Version](https://camo.githubusercontent.com/37c622b8c455e98a566aae7db6997f645f46fcb717528a17b5549da98d3a07a2/68747470733a2f2f706f7365722e707567782e6f72672f62656e636f6e737461626c652f6c6f636b2f762f737461626c652e737667)](https://packagist.org/packages/benconstable/lock)[![License](https://camo.githubusercontent.com/6485fb25a10071cee98a3fea9fad372f5f5bc7dadcee3007d7abb12b81ea41c2/68747470733a2f2f706f7365722e707567782e6f72672f62656e636f6e737461626c652f6c6f636b2f6c6963656e73652e737667)](https://packagist.org/packages/benconstable/lock)

The standard PHP `flock` function is difficult to test against. This library provides a modern, object-oriented wrapper to `flock`.

Installation
------------

[](#installation)

Add the following to your `composer.json`:

```
{
    "require": {
        "benconstable/lock": "~1.0"
    }
}
```

Usage
-----

[](#usage)

```
