Annotation of embedaddon/php/ext/spl/tests/SplDoublyLinkedList_lifoMode.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Check that SplDoublyLinkedList can traverse backwards
3: --CREDITS--
4: Rob Knight <themanhimself@robknight.org.uk> PHPNW Test Fest 2009
5: --FILE--
6: <?php
7: $list = new SplDoublyLinkedList();
8:
9: $list->push('o');
10: $list->push('o');
11: $list->push('f');
12:
13: $list->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO);
14:
15: $list->rewind();
16:
17: while ($tmp = $list->current()) {
18: echo $tmp;
19: $list->next();
20: }
21: ?>
22: --EXPECT--
23: foo
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>