1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 01:48:26 +02:00
Files
archived-php-src/ext/spl/tests/bug61418.phpt
T
Gustavo André dos Santos Lopes d870a41118 - Fixed bug #61418 (Segmentation fault when DirectoryIterator's or
FilesystemIterator's iterators are requested more than once without
  having had its dtor callback called in between).
2012-03-18 15:07:20 +00:00

24 lines
564 B
PHP

--TEST--
Bug #61418: Segmentation fault using FiltesystemIterator & RegexIterator
--FILE--
<?php
$fileIterator = new FilesystemIterator(__DIR__, FilesystemIterator::KEY_AS_FILENAME);
$regexpIterator = new RegexIterator($fileIterator, '#.*#');
foreach ($fileIterator as $key => $file)
{
}
unset($regexpIterator);
unset($fileIterator);
$dirIterator = new DirectoryIterator(__DIR__);
$regexpIterator2 = new RegexIterator($dirIterator, '#.*#');
foreach ($dirIterator as $key => $file)
{
}
unset($regexpIterator2);
unset($dirIterator);
?>
==DONE==
--EXPECT--
==DONE==