1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/spl/tests/bug36287.phpt
2025-06-21 22:18:52 +02:00

31 lines
491 B
PHP

--TEST--
Bug #36287 (Segfault with SplFileInfo conversion)
--FILE--
<?php
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("."), RecursiveIteratorIterator::SELF_FIRST);
$idx = 0;
foreach($it as $file)
{
echo "First\n";
var_Dump($file->getFilename());
echo "Second\n";
var_dump($file->getFilename());
if (++$idx > 1)
{
break;
}
}
?>
--EXPECTF--
First
string(%d) "%s"
Second
string(%d) "%s"
First
string(%d) "%s"
Second
string(%d) "%s"