mirror of
https://github.com/php/php-src.git
synced 2024-12-12 19:33:31 +08:00
7d79686f45
Partly by adding new mode TOSTRING_USE_INNER
25 lines
431 B
PHP
Executable File
25 lines
431 B
PHP
Executable File
--TEST--
|
|
SPL: CachingIterator and __toString and flags = 0
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
|
--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
|