summaryrefslogtreecommitdiff
path: root/ext/spl/tests/dllist_memleak.phpt
blob: 142206f0a72c23c5d1ccdea62c6928d5fee236c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
SPL: DoublyLinkedList: memory leak when iterator pointer isn't at the last element
--FILE--
<?php
$dll = new SplDoublyLinkedList();
$dll->push(1);
$dll->push(2);
$dll->push(3);
$dll->push(4);


$dll->rewind();
echo $dll->current()."\n";
$dll->next();
$dll->next();
echo $dll->current()."\n";

?>
--EXPECT--
1
3