summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug62073.phpt
blob: 3bd355317f6d645e151619f3cb2cf4e51c22cfc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Bug #62073 (different ways of iterating over an SplMaxHeap result in different keys)
--FILE--
<?php
$heap = new SplMaxHeap();
$heap->insert(42);
foreach ($heap as $key => $value) {
    var_dump($key);
    var_dump($value);
    break;
}

$heap = new SplMaxHeap();
$heap->insert(42);
var_dump($heap->key());
var_dump($heap->current());
?>
--EXPECT--
int(0)
int(42)
int(0)
int(42)