summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug36287.phpt
blob: 0fa6e1bc1eefd08ca168574dc69d79e9bef587d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
Bug #36287 (Segfault with SplFileInfo conversion)
--FILE--
<?php

$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("."), true);

$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"