Skip to content
/ shmop Public

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

License

Notifications You must be signed in to change notification settings

gpslab/shmop

Repository files navigation

Latest Stable Version Total Downloads Build Status Coverage Status Scrutinizer Code Quality SensioLabs Insight StyleCI License

Shmop

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

Shared memory

Installation

Pretty simple with Composer, run:

composer require gpslab/shmop

Usage

Creating new block

use GpsLab\Component\Shmop\Block;

$sh = new Block(
    0xFF, // id for memory block
    3 // memory block size
);
$sh->write('foo');
echo $sh->read(); // print 'foo'
$sh->delete();

Memory block must be a fixed size for correct reading from it.

Reading an existing block

use GpsLab\Component\Shmop\Block;

$sh = new Block(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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages