2017 © Pedro Peláez
 

library simple-shm

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

image

klaussilveira/simple-shm

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

  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 44 Forks
  • 2 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

SimpleSHM

Build Status, (*1)

SimpleSHM is a simple and small abstraction layer for shared memory manipulation using PHP. It makes use of the SHMOP functions, built into most PHP packages., (*2)

Authors and contributors

License

New BSD license, (*3)

Todo

  • add support for arrays, by automatically serializing or converting to JSON
  • add support for objects, by using JSON
  • create a better documentation
  • error handling can, and should, be improved
  • test, test, test

About Shared Memory

Shared Memory is an efficient mean of exchanging data between applications in the same machine. One application will create a memory portion which other processes can access, as long as they have the proper permissions. You can read more about it here: http://stereochro.me/assets/uploads/notes/dcom3/shmem.pdf, (*4)

Using SimpleSHM

The idea behind SimpleSHM is to keep things very easy to use. If you want better control and flexibility, you can always modify the class or extend it., (*5)

<?php

use Simple\SHM\Block;

/**
 * Creating new block, with a random ID
 */
$memory = new Block;
$memory->write('Sample');
echo $memory->read();

/**
 * Creating new block, with an specified ID
 */
$new = new Block(897);
$new->write('Sample');
echo $new->read();

/**
 * Reading an existing block, with the ID of 42
 */
$existing = new Block(42);
echo $existing->read();

The Versions

20/05 2016

dev-master

9999999-dev

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

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

29/03 2014

1.0.0

1.0.0.0

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

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3