1--TEST--
2Test array_combine() function : usage variations - binary safe checking
3--FILE--
4<?php
5/*
6* Testing the behavior of array_combine() by passing array with
7* binary values for $keys and $values argument.
8*/
9
10echo "*** Testing array_combine() : binary safe checking ***\n";
11
12// array with binary values
13$arr_binary = array(b"hello", b"world");
14$arr_normal = array("hello", "world");
15
16// array with binary value for $keys and $values argument
17var_dump( array_combine($arr_binary, $arr_binary) );
18
19// array with binary value for $values argument
20var_dump( array_combine($arr_normal, $arr_binary) );
21
22// array with binary value for $keys argument
23var_dump( array_combine($arr_binary, $arr_normal) );
24
25echo "Done";
26?>
27--EXPECT--
28*** Testing array_combine() : binary safe checking ***
29array(2) {
30  ["hello"]=>
31  string(5) "hello"
32  ["world"]=>
33  string(5) "world"
34}
35array(2) {
36  ["hello"]=>
37  string(5) "hello"
38  ["world"]=>
39  string(5) "world"
40}
41array(2) {
42  ["hello"]=>
43  string(5) "hello"
44  ["world"]=>
45  string(5) "world"
46}
47Done
48