xref: /PHP-8.4/ext/spl/tests/dllist_010.phpt (revision a555cc0b)
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--EXPECT--
27NULL
28int(1)
29int(2)
30int(4)
31int(3)
32