diff options
Diffstat (limited to 'ext/spl/tests/iterator_019.phpt')
-rwxr-xr-x | ext/spl/tests/iterator_019.phpt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ext/spl/tests/iterator_019.phpt b/ext/spl/tests/iterator_019.phpt new file mode 100755 index 0000000000..09842b0988 --- /dev/null +++ b/ext/spl/tests/iterator_019.phpt @@ -0,0 +1,33 @@ +--TEST-- +SPL: NoRweindIterator +--FILE-- +<?php + +echo "===Current===\n"; + +$it = new NoRewindIterator(new ArrayIterator(array(0 => 'A', 1 => 'B', 2 => 'C'))); + +echo $it->key() . '=>' . $it->current() . "\n"; + +echo "===Next===\n"; + +$it->next(); + +echo "===Foreach===\n"; + +foreach($it as $key=>$val) +{ + echo "$key=>$val\n"; +} + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +===Current=== +0=>A +===Next=== +===Foreach=== +1=>B +2=>C +===DONE=== |