1--TEST--
2SPL: RecursiveTreeIterator and binary vs unicode (PHP 6.0+)
3--INI--
4error_reporting=E_ALL&~E_NOTICE
5--FILE--
6<?php
7
8$ary = array(
9    0 => array(
10        (binary) "binary",
11        "abc2",
12        1,
13    ),
14    (binary) "binary" => array(
15        2,
16        "b",
17        3 => array(
18            4,
19            "c",
20        ),
21        "4abc" => array(
22            4,
23            "c",
24        ),
25    ),
26);
27
28$it = new RecursiveTreeIterator(new RecursiveArrayIterator($ary), 0);
29foreach($it as $k => $v) {
30    var_dump($v);
31}
32echo "\n----------------\n\n";
33foreach($it as $k => $v) {
34    var_dump($k);
35}
36echo "\n----------------\n\n";
37echo "key, getEntry, current:\n";
38foreach($it as $k => $v) {
39    var_dump($it->key(), $it->getEntry(), $it->current());
40}
41?>
42--EXPECT--
43string(7) "|-Array"
44string(10) "| |-binary"
45string(8) "| |-abc2"
46string(5) "| \-1"
47string(7) "\-Array"
48string(5) "  |-2"
49string(5) "  |-b"
50string(9) "  |-Array"
51string(7) "  | |-4"
52string(7) "  | \-c"
53string(9) "  \-Array"
54string(7) "    |-4"
55string(7) "    \-c"
56
57----------------
58
59string(3) "|-0"
60string(5) "| |-0"
61string(5) "| |-1"
62string(5) "| \-2"
63string(8) "\-binary"
64string(5) "  |-0"
65string(5) "  |-1"
66string(5) "  |-3"
67string(7) "  | |-0"
68string(7) "  | \-1"
69string(8) "  \-4abc"
70string(7) "    |-0"
71string(7) "    \-1"
72
73----------------
74
75key, getEntry, current:
76string(3) "|-0"
77string(5) "Array"
78string(7) "|-Array"
79string(5) "| |-0"
80string(6) "binary"
81string(10) "| |-binary"
82string(5) "| |-1"
83string(4) "abc2"
84string(8) "| |-abc2"
85string(5) "| \-2"
86string(1) "1"
87string(5) "| \-1"
88string(8) "\-binary"
89string(5) "Array"
90string(7) "\-Array"
91string(5) "  |-0"
92string(1) "2"
93string(5) "  |-2"
94string(5) "  |-1"
95string(1) "b"
96string(5) "  |-b"
97string(5) "  |-3"
98string(5) "Array"
99string(9) "  |-Array"
100string(7) "  | |-0"
101string(1) "4"
102string(7) "  | |-4"
103string(7) "  | \-1"
104string(1) "c"
105string(7) "  | \-c"
106string(8) "  \-4abc"
107string(5) "Array"
108string(9) "  \-Array"
109string(7) "    |-0"
110string(1) "4"
111string(7) "    |-4"
112string(7) "    \-1"
113string(1) "c"
114string(7) "    \-c"
115