mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
23 lines
367 B
Plaintext
23 lines
367 B
Plaintext
|
--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
|