PHP code example of mrtwenty / flower-client

1. Go to this page and download the library: Download mrtwenty/flower-client 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/ */

    

mrtwenty / flower-client example snippets


# pecl redis
$redis = new \Redis();
$mq    = [
    'name'       => 'mq',
    'delay_name' => 'mq_delay',
];
$client = new Client($redis, $mq);

# add queue 
$res = $client->add(['test' => 'data']);
var_dump($res);

# delay add queue
$second = 3;
$res = $client->add(['test' => 'data'], $second);
var_dump($res);