Exemplo n.º 1
0
    echo "EXCEPTION CAUGHT!\n";
}
echo "    Pop -> ";
$val = null;
try {
    $val = $testPriorityQueue->pop();
    echo "{$val}\n";
} 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') -> ";