K2hQueue::push K2hQueue Class K2hQueue::remove

K2hQueue::read

Returns a key/value pair from the K2hQueue

Description

public stringfalseK2hQueue::read ([ int $pos [, string $pass ]] )

Returns a value from the K2hQueue. This operation will not remove the value from the K2hQueue.

Note

This operation will not remove the element from the K2hQueue. Use K2hQueue::pop to removes and returns the element instead.

Parameters

Return Values

Returns a value.

Examples

<?php
$handle = k2hpx_open_mem();
$k2hqueue = new K2hQueue($handle, true, "test_queue_");
$k2hqueue->push("test_queue_value");
var_dump($k2hqueue->read(0));
unset($k2hqueue);
k2hpx_close($handle);
?>

The above example will output:

string(16) "test_queue_value"

See Also

K2hQueue::push K2hQueue Class K2hQueue::remove