PHP code example of pbergman / fifo
1. Go to this page and download the library: Download pbergman/fifo library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pbergman / fifo example snippets
$object = new \stdClass();
$object->foo = 'bar';
$object->bar = 'foo';
$transport = new \PBergman\FIFO\Transport(posix_getpid());
$transport->write($object);
$transport->signal(SIGINT);
var_dump($transport->read()) // Will return $object;
var_dump($transport->read()) // Will return SIGINT;
var_dump($transport->read()) // Will return false;