summaryrefslogtreecommitdiff
path: root/ext/spl/tests/spl_iterator_caching_count_basic.phpt
blob: 4d9c90f86b9f93b23962fd8bab8c5e9f13054c67 (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===