Annotation of embedaddon/php/ext/spl/tests/iterator_019.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: SPL: NoRewindIterator
! 3: --FILE--
! 4: <?php
! 5:
! 6: echo "===Current===\n";
! 7:
! 8: $it = new NoRewindIterator(new ArrayIterator(array(0 => 'A', 1 => 'B', 2 => 'C')));
! 9:
! 10: echo $it->key() . '=>' . $it->current() . "\n";
! 11:
! 12: echo "===Next===\n";
! 13:
! 14: $it->next();
! 15:
! 16: echo "===Foreach===\n";
! 17:
! 18: foreach($it as $key=>$val)
! 19: {
! 20: echo "$key=>$val\n";
! 21: }
! 22:
! 23: ?>
! 24: ===DONE===
! 25: <?php exit(0); ?>
! 26: --EXPECTF--
! 27: ===Current===
! 28: 0=>A
! 29: ===Next===
! 30: ===Foreach===
! 31: 1=>B
! 32: 2=>C
! 33: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>