xref: /PHP-7.3/ext/spl/tests/bug36287.phpt (revision 610c7fbe)
1--TEST--
2Bug #36287 (Segfault with SplFileInfo conversion)
3--FILE--
4<?php
5
6$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("."), true);
7
8$idx = 0;
9foreach($it as $file)
10{
11	echo "First\n";
12	var_Dump($file->getFilename());
13	echo "Second\n";
14	var_dump($file->getFilename());
15	if (++$idx > 1)
16	{
17		break;
18	}
19}
20
21?>
22===DONE===
23--EXPECTF--
24First
25string(%d) "%s"
26Second
27string(%d) "%s"
28First
29string(%d) "%s"
30Second
31string(%d) "%s"
32===DONE===
33