1--TEST-- 2SPL: IteratorIterator foreach by reference failure 3--CREDITS-- 4Lukasz Andrzejak meltir@meltir.com 5#testfest London 2009-05-09 6--FILE-- 7<?php 8$i = new ArrayIterator(array(1,1,1,1,1)); 9$iii = new IteratorIterator($i); 10p($iii); 11function p ($i) { 12 foreach ($i as &$value) {} 13} 14?> 15--EXPECTF-- 16Fatal error: An iterator cannot be used with foreach by reference in %s