--TEST-- SPL: SplHeap top, corrupted heap --CREDITS-- Mark Schaschke (mark@fractalturtle.com) TestFest London May 2009 --FILE-- insert(4); try { $h->insert(5); } catch (Exception $e) {} // call top, should fail with corrupted heap try { $h->top(); } catch (Exception $e) { echo $e->getMessage(); } ?> --EXPECTF-- Heap is corrupted, heap properties are no longer ensured.