summaryrefslogtreecommitdiff
path: root/ext/spl/tests/spl_iterator_caching_count_basic.phpt
blob: b11eb7b5409dcc1ca9d11e22f9f4eb1cfbe5d198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
SPL: Caching iterator count() cache contents
--CREDITS--
Lukasz Andrzejak meltir@meltir.com
#testfest London 2009-05-09
--FILE--
<?php
$i = new ArrayIterator(array(1,1,1,1,1));
$i = new CachingIterator($i,CachingIterator::FULL_CACHE);
foreach ($i as $value) {
  echo $i->count()."\n";
}
?>
===DONE===
--EXPECT--
1
2
3
4
5
===DONE===