1. Go to this page and download the library: Download slowmove/simple-php-queue 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/ */
slowmove / simple-php-queue example snippets
use Slowmove\SimplePhpQueue\Queue;
use Slowmove\SimplePhpQueue\Storage\StorageType;
$queue = new Queue(StorageType::SQLITE, "./queue.db");
for ($i = 0; $i < 150; $i++) {
$queue->enqueue("test $i");
}
use Slowmove\SimplePhpQueue\Queue;
use Slowmove\SimplePhpQueue\Storage\StorageType;
$queue = new Queue(StorageType::SQLITE, "./queue.db", true);
$queue->listen(function ($item) {
echo $item . PHP_EOL;
});
enum StorageType: string
{
case FILE = 'file';
case SQLITE = 'sqlite';
case REDIS = 'redis';
case BEANSTALKD = 'beanstalkd';
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.