1--TEST--
2Test array_diff_assoc() function : usage variations - binary safe check
3--FILE--
4<?php
5/*
6 * Test how array_diff_assoc() compares binary data
7 */
8
9echo "*** Testing array_diff_assoc() : usage variations ***\n";
10
11$array1 = array( b"1",
12                 b"hello",
13                 "world",
14                 "str1" => "hello",
15                 "str2" => "world");
16
17$array2 = array( b"1" => 'hello',
18                 b"world",
19                 "hello",
20                 'test');
21
22var_dump(array_diff_assoc($array1, $array2));
23var_dump(array_diff_assoc($array2, $array1));
24
25echo "Done";
26?>
27--EXPECT--
28*** Testing array_diff_assoc() : usage variations ***
29array(3) {
30  [0]=>
31  string(1) "1"
32  ["str1"]=>
33  string(5) "hello"
34  ["str2"]=>
35  string(5) "world"
36}
37array(2) {
38  [3]=>
39  string(5) "hello"
40  [4]=>
41  string(4) "test"
42}
43Done
44