1--TEST--
2Test array_values() function : usage variations - internal array pointer
3--FILE--
4<?php
5/* Prototype  : array array_values(array $input)
6 * Description: Return just the values from the input array
7 * Source code: ext/standard/array.c
8 */
9
10/*
11 * Test the position of the internal array pointer after a call to array_values
12 */
13
14echo "*** Testing array_values() : usage variations ***\n";
15
16$input = array ('one' => 'un', 'two' => 'deux', 'three' => 'trois');
17
18echo "\n-- Call array_values() --\n";
19var_dump($result = array_values($input));
20
21echo "-- Position of Internal Pointer in Result: --\n";
22echo key($result) . " => " . current($result) . "\n";
23echo "\n-- Position of Internal Pointer in Original Array: --\n";
24echo key($input) . " => " . current ($input) . "\n";
25
26echo "Done";
27?>
28--EXPECT--
29*** Testing array_values() : usage variations ***
30
31-- Call array_values() --
32array(3) {
33  [0]=>
34  string(2) "un"
35  [1]=>
36  string(4) "deux"
37  [2]=>
38  string(5) "trois"
39}
40-- Position of Internal Pointer in Result: --
410 => un
42
43-- Position of Internal Pointer in Original Array: --
44one => un
45Done
46