Exemplo n.º 1
0
} catch (\Exception $e) {
    echo "EXCEPTION CAUGHT!\n";
}
echo "\nQueue Internals --\n\n";
var_dump($testPriorityQueue->getList());
echo "\n";
echo "    Bottom -> ";
try {
    echo $testPriorityQueue->bottom() . "\n";
} catch (\Exception $e) {
    echo "EXCEPTION CAUGHT!";
}
echo "    Pull -> ";
$val = null;
try {
    $val = $testPriorityQueue->pull();
    echo "{$val}\n";
} catch (\Exception $e) {
    echo "EXCEPTION CAUGHT!\n";
}
echo "\nQueue Internals --\n\n";
var_dump($testPriorityQueue->getList());
echo "\n";
echo "   Delete ('air') -> ";
$success = true;
try {
    $testPriorityQueue->delete('air');
} catch (\Exception $e) {
    $success = false;
}
if ($success) {