xref: /PHP-5.5/ext/spl/tests/iterator_036.phpt (revision 610c7fbe)
1--TEST--
2SPL: CachingIterator and __toString and flags = 0
3--FILE--
4<?php
5
6function test($it)
7{
8	foreach($it as $v)
9	{
10		var_dump((string)$it);
11	}
12}
13
14$ar = new ArrayIterator(array(1, 2, 3));
15
16test(new CachingIterator($ar, 0));
17
18?>
19===DONE===
20--EXPECTF--
21
22Fatal error: Method CachingIterator::__toString() must not throw an exception in %siterator_036.php on line %d
23