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===DONE===
43--EXPECT--
44string(7) "|-Array"
45string(10) "| |-binary"
46string(8) "| |-abc2"
47string(5) "| \-1"
48string(7) "\-Array"
49string(5) "  |-2"
50string(5) "  |-b"
51string(9) "  |-Array"
52string(7) "  | |-4"
53string(7) "  | \-c"
54string(9) "  \-Array"
55string(7) "    |-4"
56string(7) "    \-c"
57
58----------------
59
60string(3) "|-0"
61string(5) "| |-0"
62string(5) "| |-1"
63string(5) "| \-2"
64string(8) "\-binary"
65string(5) "  |-0"
66string(5) "  |-1"
67string(5) "  |-3"
68string(7) "  | |-0"
69string(7) "  | \-1"
70string(8) "  \-4abc"
71string(7) "    |-0"
72string(7) "    \-1"
73
74----------------
75
76key, getEntry, current:
77string(3) "|-0"
78string(5) "Array"
79string(7) "|-Array"
80string(5) "| |-0"
81string(6) "binary"
82string(10) "| |-binary"
83string(5) "| |-1"
84string(4) "abc2"
85string(8) "| |-abc2"
86string(5) "| \-2"
87string(1) "1"
88string(5) "| \-1"
89string(8) "\-binary"
90string(5) "Array"
91string(7) "\-Array"
92string(5) "  |-0"
93string(1) "2"
94string(5) "  |-2"
95string(5) "  |-1"
96string(1) "b"
97string(5) "  |-b"
98string(5) "  |-3"
99string(5) "Array"
100string(9) "  |-Array"
101string(7) "  | |-0"
102string(1) "4"
103string(7) "  | |-4"
104string(7) "  | \-1"
105string(1) "c"
106string(7) "  | \-c"
107string(8) "  \-4abc"
108string(5) "Array"
109string(9) "  \-Array"
110string(7) "    |-0"
111string(1) "4"
112string(7) "    |-4"
113string(7) "    \-1"
114string(1) "c"
115string(7) "    \-c"
116===DONE===
117