diff options
Diffstat (limited to 'ext/spl/tests/iterator_035.phpt')
-rw-r--r-- | ext/spl/tests/iterator_035.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/spl/tests/iterator_035.phpt b/ext/spl/tests/iterator_035.phpt new file mode 100644 index 0000000..9ce098b --- /dev/null +++ b/ext/spl/tests/iterator_035.phpt @@ -0,0 +1,15 @@ +--TEST-- +SPL: ArrayIterator and values assigned by reference +--FILE-- +<?php + +$tmp = 1; + +$a = new ArrayIterator(); +$a[] = $tmp; +$a[] = &$tmp; + +echo "Done\n"; +?> +--EXPECTF-- +Fatal error: Cannot assign by reference to overloaded object in %s on line %d |