summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug36287.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/bug36287.phpt')
-rw-r--r--ext/spl/tests/bug36287.phpt32
1 files changed, 32 insertions, 0 deletions
diff --git a/ext/spl/tests/bug36287.phpt b/ext/spl/tests/bug36287.phpt
new file mode 100644
index 0000000..0c3f287
--- /dev/null
+++ b/ext/spl/tests/bug36287.phpt
@@ -0,0 +1,32 @@
+--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;
+ }
+}
+
+?>
+===DONE===
+--EXPECTF--
+First
+string(%d) "%s"
+Second
+string(%d) "%s"
+First
+string(%d) "%s"
+Second
+string(%d) "%s"
+===DONE===