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){ 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$heap->isEmpty('var'); 25?> 26--EXPECTF-- 27bool(true) 28bool(false) 29bool(true) 30 31Warning: SplHeap::isEmpty() expects exactly 0 parameters, 1 given in %s 32