summaryrefslogtreecommitdiff
path: root/ext/spl/tests/iterator_036.phpt
blob: 9a9e66b3b3cec576c86f1700c9d8fb8495e72ad7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
SPL: CachingIterator and __toString and flags = 0
--FILE--
<?php

function test($it)
{
	foreach($it as $v)
	{
		var_dump((string)$it);
	}
}

$ar = new ArrayIterator(array(1, 2, 3));

test(new CachingIterator($ar, 0));

?>
===DONE===
--EXPECTF--	

Fatal error: Method CachingIterator::__toString() must not throw an exception in %siterator_036.php on line %d