summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug36287.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/bug36287.phpt')
-rwxr-xr-xext/spl/tests/bug36287.phpt40
1 files changed, 40 insertions, 0 deletions
diff --git a/ext/spl/tests/bug36287.phpt b/ext/spl/tests/bug36287.phpt
new file mode 100755
index 0000000000..29ae0e2c9d
--- /dev/null
+++ b/ext/spl/tests/bug36287.phpt
@@ -0,0 +1,40 @@
+--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===