项目作者: anime-db

项目描述 :
[DEPRECATED] This is end of life and not maintained. Migrate to https://github.com/gpslab/shmop
高级语言: PHP
项目地址: git://github.com/anime-db/shmop.git
创建时间: 2014-07-02T13:23:23Z
项目社区:https://github.com/anime-db/shmop

开源协议:MIT License

下载


Latest Stable Version
Latest Unstable Version
Total Downloads
Build Status
Code Coverage
Scrutinizer Code Quality
SensioLabsInsight
StyleCI
Dependency Status
License

Shmop

Shmop is a simple and small abstraction layer for shared memory manipulation using PHP

Installation

Pretty simple with Composer, run:

  1. composer require anime-db/shmop

Usage

Creating new block

  1. use AnimeDb\Shmop\FixedBlock;
  2. $sh = new FixedBlock(0xFF /* id for memory block */, 3 /* memory block size */);
  3. $sh->write('foo');
  4. echo $sh->read(); // print 'foo'
  5. $sh->delete();

Reading an existing block

  1. use AnimeDb\Shmop\FixedBlock;
  2. $sh = new FixedBlock(0xFF, 3);
  3. // print contents of memory block. if block is not exists prints a blank line
  4. echo $sh->read();

License

This bundle is under the MIT license. See the complete license in the file: LICENSE