xref: /php-src/ext/spl/tests/bug61828.phpt (revision 61c299fe)
1--TEST--
2Bug #61828 (Memleak when calling Directory(Recursive)Iterator/Spl(Temp)FileObject ctor twice)
3--FILE--
4<?php
5$x = new DirectoryIterator('.');
6
7try {
8    $x->__construct('/tmp');
9} catch (\Error $e) {
10    echo $e->getMessage() . \PHP_EOL;
11}
12
13?>
14--EXPECT--
15Directory object is already initialized
16