mirror of
https://github.com/php/php-src.git
synced 2024-10-03 15:56:11 +00:00
15 lines
361 B
PHP
15 lines
361 B
PHP
--TEST--
|
|
DirectoryIterator: test that you cannot use iterator with reference
|
|
--CREDITS--
|
|
Havard Eide <nucleuz@gmail.com>
|
|
#PHPTestFest2009 Norway 2009-06-09 \o/
|
|
--FILE--
|
|
<?php
|
|
$it = new DirectoryIterator(__DIR__);
|
|
foreach( $it as &$file ) {
|
|
echo $file . "\n";
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: An iterator cannot be used with foreach by reference in %s on line %d
|