xref: /PHP-5.3/ext/spl/tests/iterator_035.phpt (revision e2ba5c79)
1--TEST--
2SPL: ArrayIterator and values assigned by reference
3--FILE--
4<?php
5
6$tmp = 1;
7
8$a = new ArrayIterator();
9$a[] = $tmp;
10$a[] = &$tmp;
11
12echo "Done\n";
13?>
14--EXPECTF--
15Notice: Indirect modification of overloaded element of ArrayIterator has no effect in %s on line %d
16
17Fatal error: Cannot assign by reference to overloaded object in %s on line %d
18