1--TEST--
2Test array_combine() function : basic functionality
3--FILE--
4<?php
5echo "*** Testing array_combine() : basic functionality ***\n";
6
7/* Different arrays for $keys and $values arguments */
8
9// array with default keys for $keys and $values arguments
10$keys_array = array(1, 2);
11$values_array = array(3,4);
12var_dump( array_combine($keys_array, $values_array) );
13
14// associative arrays for $keys and $values arguments
15$keys_array = array(1 => "a", 2 => 'b');
16$values_array = array(3 => 'c', 4 => "d");
17var_dump( array_combine($keys_array, $values_array) );
18
19// mixed array for $keys and $values arguments
20$keys_array = array(1, 2 => "b");
21$values_array = array(3 => 'c', 4);
22var_dump( array_combine($keys_array, $values_array) );
23
24echo "Done";
25?>
26--EXPECT--
27*** Testing array_combine() : basic functionality ***
28array(2) {
29  [1]=>
30  int(3)
31  [2]=>
32  int(4)
33}
34array(2) {
35  ["a"]=>
36  string(1) "c"
37  ["b"]=>
38  string(1) "d"
39}
40array(2) {
41  [1]=>
42  string(1) "c"
43  ["b"]=>
44  int(4)
45}
46Done
47