xref: /PHP-7.3/ext/spl/tests/dllist_010.phpt (revision 3e58e86d)
1--TEST--
2SPL: DoublyLinkedList: prev
3--FILE--
4<?php
5$dll = new SplDoublyLinkedList();
6$dll->push(1);
7$dll->push(2);
8$dll->push(3);
9$dll->push(4);
10
11
12$dll->rewind();
13$dll->prev();
14var_dump($dll->current());
15$dll->rewind();
16var_dump($dll->current());
17$dll->next();
18var_dump($dll->current());
19$dll->next();
20$dll->next();
21var_dump($dll->current());
22$dll->prev();
23var_dump($dll->current());
24
25?>
26===DONE===
27--EXPECT--
28NULL
29int(1)
30int(2)
31int(4)
32int(3)
33===DONE===
34