--TEST-- Test referenced B (foreach / &$i) --SKIPIF-- <?php if (!extension_loaded("xrange")) print "skip"; ?> --FILE-- <?php $j = 0; foreach (xrange(-10, 10) as &$i) { $i = 0; ++$j; } echo $j == 21 ? 'Success' : 'Failure'; ?> --EXPECTF-- Fatal error: Cannot create references to elements of a temporary array expression %a