File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / spl / tests / bug62073.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:02 2013 UTC (11 years ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--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)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>