php-src/ext/spl/tests/dllist_memleak.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

25 lines
360 B
PHP

--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";
?>
===DONE===
<?php exit(0); ?>
--EXPECT--
1
3
===DONE===