K2hQueue::read K2hQueue Class

K2hQueue::remove

Removes a value from the K2hQueue

Description

 public bool K2hQueue::remove ( int $count [, string $pass ] )

Removes a value from the K2hQueue.

Parameters

Return Values

Returns true on success or false on failure.

Examples

<?php
$handle = k2hpx_open_mem();
$k2hqueue = new K2hQueue($handle, true, "test_queue_");
$k2hqueue->push("test_queue_value1");
$k2hqueue->push("test_queue_value2");
var_dump($k2hqueue->count());
var_dump($k2hqueue->remove(1));
var_dump($k2hqueue->count());
unset($k2hqueue);
k2hpx_close($handle);
?>

The above example will output:

int(2)
bool(true)
int(1)

See Also

K2hQueue::read K2hQueue Class