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