summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug69335.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/bug69335.phpt')
-rw-r--r--ext/spl/tests/bug69335.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/spl/tests/bug69335.phpt b/ext/spl/tests/bug69335.phpt
new file mode 100644
index 0000000000..41f03efcb0
--- /dev/null
+++ b/ext/spl/tests/bug69335.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #69335 (SplArray BC break)
+--FILE--
+<?php
+$a = array(1=>1, 3=>3, 5=>5, 7=>7);
+$a = new ArrayObject($a);
+
+foreach ($a as $k => $v) {
+ var_dump("$k => $v");
+ if ($k == 3) {
+ $a['a'] = "?";
+ }
+}
+?>
+--EXPECTF--
+string(6) "1 => 1"
+string(6) "3 => 3"
+string(6) "5 => 5"
+string(6) "7 => 7"
+string(6) "a => ?"