summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug70853.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/bug70853.phpt')
-rw-r--r--ext/spl/tests/bug70853.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/spl/tests/bug70853.phpt b/ext/spl/tests/bug70853.phpt
new file mode 100644
index 0000000000..99530ece40
--- /dev/null
+++ b/ext/spl/tests/bug70853.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #70853 (SplFixedArray throws exception when using ref variable as index)
+--FILE--
+<?php
+
+$list = new SplFixedArray(10);
+$ndx = 1;
+$ndx2 =& $ndx;
+$list[$ndx] = 123; // This throws an exception;
+$list[$ndx2] = 123; // as does this, to.
+echo 'ok';
+
+?>
+--EXPECT--
+ok