1--TEST-- 2Test reset() function : basic functionality 3--FILE-- 4<?php 5/* 6 * Test basic functionality of reset() 7 */ 8 9echo "*** Testing reset() : basic functionality ***\n"; 10 11$array = array('zero', 'one', 200 => 'two'); 12 13echo "\n-- Initial Position: --\n"; 14echo key($array) . " => " . current($array) . "\n"; 15 16echo "\n-- Call to next() --\n"; 17var_dump(next($array)); 18 19echo "\n-- Current Position: --\n"; 20echo key($array) . " => " . current($array) . "\n"; 21 22echo "\n-- Call to reset() --\n"; 23var_dump(reset($array)); 24?> 25--EXPECT-- 26*** Testing reset() : basic functionality *** 27 28-- Initial Position: -- 290 => zero 30 31-- Call to next() -- 32string(3) "one" 33 34-- Current Position: -- 351 => one 36 37-- Call to reset() -- 38string(4) "zero" 39