1--TEST--
2Test reset() function : usage variations - unset first element
3--FILE--
4<?php
5/* Prototype  : mixed reset(array $array_arg)
6 * Description: Set array argument's internal pointer to the first element and return it
7 * Source code: ext/standard/array.c
8 */
9
10/*
11 * Unset first element of an array and test behaviour of reset()
12 */
13
14echo "*** Testing reset() : usage variations ***\n";
15
16$array = array('a', 'b', 'c');
17
18echo "\n-- Initial Position: --\n";
19echo current($array) . " => " . key($array) . "\n";
20
21echo "\n-- Unset First element in array and check reset() --\n";
22unset($array[0]);
23var_dump(reset($array));
24?>
25===DONE===
26--EXPECTF--
27*** Testing reset() : usage variations ***
28
29-- Initial Position: --
30a => 0
31
32-- Unset First element in array and check reset() --
33string(1) "b"
34===DONE===
35