mirror of
https://github.com/php/php-src.git
synced 2024-12-13 20:05:26 +08:00
21 lines
367 B
Plaintext
21 lines
367 B
Plaintext
|
--TEST--
|
||
|
SPL: SplHeap, Test method to insert into heap
|
||
|
--CREDITS--
|
||
|
Chris Scott chris.scott@nstein.com
|
||
|
#testfest London 2009-05-09
|
||
|
--FILE--
|
||
|
<?php
|
||
|
class MyHeap extends SplHeap
|
||
|
{
|
||
|
public function compare($a, $b)
|
||
|
{
|
||
|
return $a < $b;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$heap = new MyHeap();
|
||
|
$heap->insert(1,2);
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Warning: SplHeap::insert() expects exactly 1 parameter, %s
|