PHP code example of corley / queue-array
1. Go to this page and download the library: Download corley/queue-array 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/ */
corley / queue-array example snippets
use Corley\Queue\Queue;
use Corley\Queue\ArrayAdapter\ArrayAdapter;
$adapter = new ArrayAdapter();
$queue = new Queue("example", $adapter);
$queue->send(json_encode(["test" => "ok"]));
list($receipt, $message) = $queue->receive();
$message = json_decode($message, true);
$queue->delete($receipt);