K2hQueue::dump K2hQueue Class K2hQueue::pop

K2hQueue::isEmpty

Returns whether the K2hQueue is empty

Description

 public bool K2hQueue::isEmpty ( void )

Returns where the K2hQueue is empty.

Parameters

This function has no parameters.

Return Values

Returns true if the K2hQueue object is empty, otherwise false.

Examples

<?php
$handle = k2hpx_open_mem();
$k2hqueue = new K2hQueue($handle, true, "test_queue_");
var_dump($k2hqueue->isEmpty());
$k2hqueue->push("test_queue_data");
var_dump($k2hqueue->isEmpty());
var_dump($k2hqueue->pop());
var_dump($k2hqueue->isEmpty());
unset($k2hqueue);
k2hpx_close($handle);
?>

The above example will output:

bool(true)
bool(false)
string(15) "test_queue_data"
bool(true)
K2hQueue::dump K2hQueue Class K2hQueue::pop