1--TEST--
2DirectoryIterator: test that you cannot use iterator with reference
3--CREDITS--
4Havard Eide <nucleuz@gmail.com>
5#PHPTestFest2009 Norway 2009-06-09 \o/
6--FILE--
7<?php
8$it = new DirectoryIterator(__DIR__);
9foreach( $it as &$file ) {
10    echo $file . "\n";
11}
12?>
13--EXPECTF--
14Fatal error: Uncaught Error: An iterator cannot be used with foreach by reference in %s:%d
15Stack trace:
16#0 {main}
17  thrown in %s on line %d
18