xref: /PHP-7.4/ext/spl/tests/dllist_memleak.phpt (revision ded3d984)
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===DONE===
20<?php exit(0); ?>
21--EXPECT--
221
233
24===DONE===
25