import zend standard tests
[hiphop-php.git] / hphp / test / zend / good / ext-standard-array / reset_basic.php
blobc11d8ea9d0376d5b0baffb96d028e5b7d5a2d3e8
1 <?php
2 /* Prototype : mixed reset(array $array_arg)
3 * Description: Set array argument's internal pointer to the first element and return it
4 * Source code: ext/standard/array.c
5 */
7 /*
8 * Test basic functionality of reset()
9 */
11 echo "*** Testing reset() : basic functionality ***\n";
13 $array = array('zero', 'one', 200 => 'two');
15 echo "\n-- Initial Position: --\n";
16 echo key($array) . " => " . current($array) . "\n";
18 echo "\n-- Call to next() --\n";
19 var_dump(next($array));
21 echo "\n-- Current Position: --\n";
22 echo key($array) . " => " . current($array) . "\n";
24 echo "\n-- Call to reset() --\n";
25 var_dump(reset($array));
27 ===DONE===