xref: /PHP-7.0/ext/spl/tests/dllist_memleak.phpt (revision 3e58e86d)
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--EXPECTF--
221
233
24===DONE===
25