mirror of
https://github.com/php/php-src.git
synced 2024-10-19 23:44:13 +00:00
20 lines
357 B
Plaintext
20 lines
357 B
Plaintext
|
--TEST--
|
||
|
SPL: SplPriorityQueue: top exception on empty heap
|
||
|
--CREDITS--
|
||
|
Nathaniel McHugh nat@fishtrap.co.uk
|
||
|
#testfest 2009-05-09
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$priorityQueue = new SplPriorityQueue();
|
||
|
|
||
|
try {
|
||
|
$priorityQueue->top();
|
||
|
} catch (RuntimeException $e) {
|
||
|
echo "Exception: ".$e->getMessage().PHP_EOL;
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
Exception: Can't peek at an empty heap
|