K2hdkc::queueGet
Gets a value from the queue
Description
public function queueGet(
string $prefix,
bool $is_fifo = true,
string $password = null): string|null {}
Gets a value from the queue.
Parameters
- prefix
Specify the prefix of queue name - is_fifo
Specifytrue
if the order of the queue is FIFO(First-In-First-Out), otherwisefalse
. - password
Specify the passphrase for encrypting the value.
Return Values
Returns value on success or null
on failure.
Examples
- Example 1 - Gets a value from the queue
$ php -r '
$k2hdkc = new K2hdkc("./tests/slave.ini");
$k2hdkc->queuePut("test", "value");
var_dump($k2hdkc->queueGet("test"));
'
The above example will output:
string(5) "value"
See Also
- K2hdkc::queuePut - Puts a value on the queue