Annotation of embedaddon/php/ext/spl/tests/bug62073.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #62073 (different ways of iterating over an SplMaxHeap result in different keys)
        !             3: --FILE--
        !             4: <?php
        !             5: $heap = new SplMaxHeap();
        !             6: $heap->insert(42);
        !             7: foreach ($heap as $key => $value) {
        !             8:     var_dump($key);
        !             9:     var_dump($value);
        !            10:     break;
        !            11: }
        !            12: 
        !            13: $heap = new SplMaxHeap();
        !            14: $heap->insert(42);
        !            15: var_dump($heap->key());
        !            16: var_dump($heap->current());
        !            17: ?>
        !            18: --EXPECT--
        !            19: int(0)
        !            20: int(42)
        !            21: int(0)
        !            22: int(42)

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