mirror of
https://github.com/php/php-src.git
synced 2026-04-24 08:28:26 +02:00
6d805ed275
Closes GH-7235
17 lines
264 B
PHP
17 lines
264 B
PHP
--TEST--
|
|
SplHeap using a compare function returning by-reference
|
|
--FILE--
|
|
<?php
|
|
class Heap extends SplMinHeap {
|
|
public function &compare($a, $b): int {
|
|
return $a;
|
|
}
|
|
}
|
|
$h = new Heap;
|
|
$h->insert(0);
|
|
$h->insert(0);
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|