remove array_multisort and convert array_multisortN to use inout
[hiphop-php.git] / hphp / test / zend / good / ext / standard / tests / array / array_combine_basic.php
blob5639948e6803ccd2b7106ac30ad95ae949c48a42
1 <?hh
2 /* Prototype : array array_combine(array $keys, array $values)
3 * Description: Creates an array by using the elements of the first parameter as keys
4 * and the elements of the second as the corresponding values
5 * Source code: ext/standard/array.c
6 */
7 <<__EntryPoint>> function main(): void {
8 echo "*** Testing array_combine() : basic functionality ***\n";
10 /* Different arrays for $keys and $values arguments */
12 // array with default keys for $keys and $values arguments
13 $keys_array = array(1, 2);
14 $values_array = array(3,4);
15 var_dump( array_combine($keys_array, $values_array) );
17 // associative arrays for $keys and $values arguments
18 $keys_array = array(1 => "a", 2 => 'b');
19 $values_array = array(3 => 'c', 4 => "d");
20 var_dump( array_combine($keys_array, $values_array) );
22 // mixed array for $keys and $values arguments
23 $keys_array = array(1, 2 => "b");
24 $values_array = array(3 => 'c', 4);
25 var_dump( array_combine($keys_array, $values_array) );
27 echo "Done";