1--TEST--
2SPL: SplHeap, test trivial method to find if a heap is empty
3--CREDITS--
4Nathaniel McHugh nat@fishtrap.co.uk
5#testfest London 2009-05-09
6--FILE--
7<?php
8
9class MyHeap extends SplHeap{
10
11public function compare($a, $b): int {
12return $a < $b;
13}
14
15}
16
17
18$heap = new MyHeap();
19var_dump($heap->isEmpty());
20$heap->insert(1);
21var_dump($heap->isEmpty());
22$heap->extract();
23var_dump($heap->isEmpty());
24?>
25--EXPECT--
26bool(true)
27bool(false)
28bool(true)
29