Annotation of embedaddon/php/ext/spl/tests/fixedarray_019.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: SPL: FixedArray: overriden iterator methods
! 3: --FILE--
! 4: <?php
! 5: class SplFixedArray2 extends SplFixedArray {
! 6: public function rewind() {
! 7: echo "rewind\n";
! 8: return parent::rewind();
! 9: }
! 10: public function valid() {
! 11: echo "valid\n";
! 12: return parent::valid();
! 13: }
! 14: public function next() {
! 15: echo "next\n";
! 16: return parent::next();
! 17: }
! 18: public function current() {
! 19: echo "current\n";
! 20: return parent::current();
! 21: }
! 22: public function key() {
! 23: echo "key\n";
! 24: return parent::key();
! 25: }
! 26: }
! 27:
! 28: $fa = new SplFixedArray2(3);
! 29: foreach($fa as $k=>$v) {
! 30: echo "$k=>";
! 31: var_dump($v);
! 32: }
! 33: ?>
! 34: --EXPECT--
! 35: rewind
! 36: valid
! 37: current
! 38: key
! 39: 0=>NULL
! 40: next
! 41: valid
! 42: current
! 43: key
! 44: 1=>NULL
! 45: next
! 46: valid
! 47: current
! 48: key
! 49: 2=>NULL
! 50: next
! 51: valid
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>