xref: /PHP-8.3/ext/spl/tests/dllist_memleak.phpt (revision a555cc0b)
1--TEST--
2SPL: DoublyLinkedList: memory leak when iterator pointer isn't at the last element
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();
13echo $dll->current()."\n";
14$dll->next();
15$dll->next();
16echo $dll->current()."\n";
17
18?>
19--EXPECT--
201
213
22