summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/spl/tests/bug62616.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/spl/tests/bug62616.phpt b/ext/spl/tests/bug62616.phpt
new file mode 100644
index 0000000000..4e4be94491
--- /dev/null
+++ b/ext/spl/tests/bug62616.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #62616 (ArrayIterator::count() from IteratorIterator instance gives Segmentation fault)
+--FILE--
+<?php
+$ai = new ArrayIterator(array(0,1));
+
+var_dump($ai->count());
+
+$ii = new IteratorIterator($ai);
+
+var_dump($ii->count());
+?>
+--EXPECTF--
+int(2)
+int(2)