php-src/ext/spl/tests/iterator_035.phpt
2008-05-24 14:10:44 +00:00

16 lines
252 B
PHP

--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