Lines Matching refs:array_combine

2 Test array_combine() function : error conditions - empty array
5 /* Prototype : array array_combine(array $keys, array $values)
11 echo "*** Testing array_combine() : error conditions specific to array_combine() ***\n";
13 // Testing array_combine by passing empty arrays to $keys and $values arguments
14 echo "\n-- Testing array_combine() function with empty arrays --\n";
15 var_dump( array_combine(array(), array()) );
17 // Testing array_combine by passing empty array to $keys
18 echo "\n-- Testing array_combine() function with empty array for \$keys argument --\n";
19 var_dump( array_combine(array(), array(1, 2)) );
21 // Testing array_combine by passing empty array to $values
22 echo "\n-- Testing array_combine() function with empty array for \$values argument --\n";
23 var_dump( array_combine(array(1, 2), array()) );
25 // Testing array_combine with arrays having unequal number of elements
26 echo "\n-- Testing array_combine() function by passing array with unequal number of elements --\n";
27 var_dump( array_combine(array(1, 2), array(1, 2, 3)) );
32 *** Testing array_combine() : error conditions specific to array_combine() ***
34 -- Testing array_combine() function with empty arrays --
38 -- Testing array_combine() function with empty array for $keys argument --
40 Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
43 -- Testing array_combine() function with empty array for $values argument --
45 Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
48 -- Testing array_combine() function by passing array with unequal number of elements --
50 Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d