mirror of
https://github.com/php/php-src.git
synced 2024-12-12 19:33:31 +08:00
41 lines
562 B
PHP
Executable File
41 lines
562 B
PHP
Executable File
--TEST--
|
|
Bug #36287
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("."), true);
|
|
|
|
$idx = 0;
|
|
foreach($it as $file)
|
|
{
|
|
echo "First\n";
|
|
if("." != $file && ".." != $file)
|
|
{
|
|
var_Dump($file->getFilename());
|
|
}
|
|
echo "Second\n";
|
|
if($file != "." && $file != "..")
|
|
{
|
|
var_dump($file->getFilename());
|
|
}
|
|
if (++$idx > 1)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
First
|
|
string(%d) "%s"
|
|
Second
|
|
string(%d) "%s"
|
|
First
|
|
string(%d) "%s"
|
|
Second
|
|
string(%d) "%s"
|
|
===DONE===
|