anime-db / shmop
Shmop is a simple and small abstraction layer for shared memory manipulation using PHP
v1.0.7
2017-05-15 07:39 UTC
Requires
- php: >=5.0
- ext-shmop: *
Requires (Dev)
- phpunit/phpunit: 4.8.*
Suggests
- gpslab/shmop: Shmop has moved to a new package name. The package you have installed is deprecated.
README
Shmop
Shmop is a simple and small abstraction layer for shared memory manipulation using PHP
Installation
Pretty simple with Composer, run:
composer require anime-db/shmop
Usage
Creating new block
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
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. See the complete license in the file: LICENSE