https://github.com/anime-db/shmop
[DEPRECATED] This is end of life and not maintained. Migrate to https://github.com/gpslab/shmop
https://github.com/anime-db/shmop
php shmop
Last synced: 4 months ago
JSON representation
[DEPRECATED] This is end of life and not maintained. Migrate to https://github.com/gpslab/shmop
- Host: GitHub
- URL: https://github.com/anime-db/shmop
- Owner: anime-db
- License: mit
- Created: 2014-07-02T13:23:23.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-15T07:59:28.000Z (about 8 years ago)
- Last Synced: 2024-08-01T21:53:13.130Z (10 months ago)
- Topics: php, shmop
- Language: PHP
- Homepage:
- Size: 22.5 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://packagist.org/packages/anime-db/shmop)
[](https://packagist.org/packages/anime-db/shmop)
[](https://packagist.org/packages/anime-db/shmop)
[](https://travis-ci.org/anime-db/shmop)
[](https://scrutinizer-ci.com/g/anime-db/shmop/?branch=master)
[](https://scrutinizer-ci.com/g/anime-db/shmop/?branch=master)
[](https://insight.sensiolabs.com/projects/62ad77e3-fb3b-42d7-93e7-2e3b296a5a8b)
[](https://styleci.io/repos/21424974)
[](https://www.versioneye.com/user/projects/5746f69ace8d0e004505f4f5)
[](https://packagist.org/packages/anime-db/shmop)# Shmop
Shmop is a simple and small abstraction layer for shared memory manipulation using PHP
## Installation
Pretty simple with [Composer](http://packagist.org), run:
```sh
composer require anime-db/shmop
```## Usage
Creating new block
```php
use AnimeDb\Shmop\FixedBlock;$sh = new FixedBlock(0xFF /* id for memory block */, 3 /* memory block size */);
$sh->write('foo');
echo $sh->read(); // print 'foo'
$sh->delete();
```Reading an existing block
```php
use AnimeDb\Shmop\FixedBlock;$sh = new FixedBlock(0xFF, 3);
// print contents of memory block. if block is not exists prints a blank line
echo $sh->read();
```## License
This bundle is under the [MIT license](http://opensource.org/licenses/MIT). See the complete license in the file: LICENSE