1--TEST--
2SPL: RecursiveTreeIterator::setPostfix()
3--CREDITS--
4Joshua Thijssen (jthijssen@noxlogic.nl)
5--FILE--
6<?php
7
8$arr = array(
9	0 => array(
10		"a",
11		1,
12	),
13	"a" => array(
14		2,
15		"b",
16		3 => array(
17			4,
18			"c",
19		),
20		"3" => array(
21			4,
22			"c",
23		),
24	),
25);
26
27$it = new RecursiveArrayIterator($arr);
28$it = new RecursiveTreeIterator($it);
29
30echo "----\n";
31echo $it->getPostfix();
32echo "\n\n";
33
34echo "----\n";
35$it->setPostfix("POSTFIX");
36echo $it->getPostfix();
37echo "\n\n";
38
39echo "----\n";
40foreach($it as $k => $v) {
41	echo "[$k] => $v\n";
42}
43
44echo "----\n";
45$it->setPostfix("");
46echo $it->getPostfix();
47echo "\n\n";
48
49echo "----\n";
50foreach($it as $k => $v) {
51	echo "[$k] => $v\n";
52}
53
54
55
56?>
57===DONE===
58--EXPECT--
59----
60
61
62----
63POSTFIX
64
65----
66[0] => |-ArrayPOSTFIX
67[0] => | |-aPOSTFIX
68[1] => | \-1POSTFIX
69[a] => \-ArrayPOSTFIX
70[0] =>   |-2POSTFIX
71[1] =>   |-bPOSTFIX
72[3] =>   \-ArrayPOSTFIX
73[0] =>     |-4POSTFIX
74[1] =>     \-cPOSTFIX
75----
76
77
78----
79[0] => |-Array
80[0] => | |-a
81[1] => | \-1
82[a] => \-Array
83[0] =>   |-2
84[1] =>   |-b
85[3] =>   \-Array
86[0] =>     |-4
87[1] =>     \-c
88===DONE===
89