--FILE--
<?php
-$root = simplexml_load_string('<?xml version="1.0"?>
+$root = simplexml_load_string(b'<?xml version="1.0"?>
<root>
<child>Hello</child>
<child>World</child>
int(1)
array(3) {
[0]=>
- string(3) "1,2"
+ %s(3) "1,2"
[1]=>
- string(1) "1"
+ %s(1) "1"
[2]=>
- string(1) "2"
+ %s(1) "2"
}
int(2)
array(3) {
[0]=>
- string(3) "1,2"
+ %s(3) "1,2"
[1]=>
- string(1) "1"
+ %s(1) "1"
[2]=>
- string(1) "2"
+ %s(1) "2"
}
int(0)
array(2) {
[0]=>
- string(1) "1"
+ %s(1) "1"
[1]=>
- string(1) "1"
+ %s(1) "1"
}
int(1)
array(2) {
[0]=>
- string(1) "1"
+ %s(1) "1"
[1]=>
- string(1) "1"
+ %s(1) "1"
}
int(2)
array(2) {
[0]=>
- string(1) "1"
+ %s(1) "1"
[1]=>
- string(1) "1"
+ %s(1) "1"
}
object(ArrayIterator)#%d (9) {
[0]=>
unicode(3) "1,2"
array(3) {
[0]=>
- string(3) "1,2"
+ unicode(3) "1,2"
[1]=>
- string(1) "1"
+ unicode(1) "1"
[2]=>
- string(1) "2"
+ unicode(1) "2"
}
unicode(5) "1,2,3"
array(3) {
[0]=>
- string(3) "1,2"
+ unicode(3) "1,2"
[1]=>
- string(1) "1"
+ unicode(1) "1"
[2]=>
- string(1) "2"
+ unicode(1) "2"
}
int(1)
array(2) {
[0]=>
- string(1) "1"
+ unicode(1) "1"
[1]=>
- string(1) "1"
+ unicode(1) "1"
}
unicode(3) "1,2"
array(2) {
[0]=>
- string(1) "1"
+ unicode(1) "1"
[1]=>
- string(1) "1"
+ unicode(1) "1"
}
unicode(5) "1,2,3"
array(2) {
[0]=>
- string(1) "1"
+ unicode(1) "1"
[1]=>
- string(1) "1"
+ unicode(1) "1"
}
int(0)
array(2) {
[0]=>
- string(1) "0"
+ unicode(1) "0"
[1]=>
- string(1) "0"
+ unicode(1) "0"
}
-object(ArrayIterator)#%d (7) {
+object(ArrayIterator)#1 (7) {
[1]=>
int(0)
[u"1,2"]=>
%s(2) ",,"
}
===DONE===
+--UEXPECTF--
+bool(true)
+int(0)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(1)
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "1,2"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "1"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ unicode(1) "2"
+ }
+}
+bool(true)
+int(2)
+array(3) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(3) "1,2"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "1"
+ }
+ [2]=>
+ array(1) {
+ [0]=>
+ unicode(1) "2"
+ }
+}
+bool(true)
+int(3)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(4)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(5)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(6)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(7)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(8)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(0)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(1) "1"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "1"
+ }
+}
+bool(true)
+int(1)
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(1) "2"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(1) "2"
+ }
+}
+bool(true)
+int(2)
+array(2) {
+ [0]=>
+ array(3) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(1) "2"
+ [2]=>
+ unicode(1) "3"
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(1) "2"
+ [2]=>
+ unicode(1) "3"
+ }
+}
+bool(true)
+int(3)
+array(2) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+}
+bool(true)
+int(4)
+array(2) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+}
+bool(true)
+int(5)
+array(2) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+}
+bool(true)
+int(6)
+array(2) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+}
+bool(true)
+int(7)
+array(2) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+}
+bool(true)
+int(8)
+array(2) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+}
+object(ArrayIterator)#%d (9) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(3) "1,2"
+ [2]=>
+ unicode(5) "1,2,3"
+ [3]=>
+ unicode(0) ""
+ [4]=>
+ NULL
+ [5]=>
+ array(0) {
+ }
+ [6]=>
+ unicode(6) "FooBar"
+ [7]=>
+ unicode(1) ","
+ [8]=>
+ unicode(2) ",,"
+}
+===DONE===
%s(2) ",,"
}
===DONE===
+--UEXPECTF--
+bool(true)
+int(0)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(1)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(2)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(3)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(4)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(5)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(6)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(7)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(8)
+array(3) {
+ [0]=>
+ array(0) {
+ }
+ [1]=>
+ array(0) {
+ }
+ [2]=>
+ array(0) {
+ }
+}
+bool(true)
+int(0)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(1) "0"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "0"
+ }
+}
+bool(true)
+int(1)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(1) "1"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "1"
+ }
+}
+bool(true)
+int(2)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(1) "2"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "2"
+ }
+}
+bool(true)
+int(3)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(1) "3"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "3"
+ }
+}
+bool(true)
+int(4)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(1) "4"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "4"
+ }
+}
+bool(true)
+int(5)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(1) "5"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "5"
+ }
+}
+bool(true)
+int(6)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(1) "6"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "6"
+ }
+}
+bool(true)
+int(7)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(1) "7"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "7"
+ }
+}
+bool(true)
+int(8)
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ unicode(1) "8"
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ unicode(1) "8"
+ }
+}
+object(ArrayIterator)#%d (9) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(3) "1,2"
+ [2]=>
+ unicode(5) "1,2,3"
+ [3]=>
+ unicode(0) ""
+ [4]=>
+ NULL
+ [5]=>
+ array(0) {
+ }
+ [6]=>
+ unicode(6) "FooBar"
+ [7]=>
+ unicode(1) ","
+ [8]=>
+ unicode(2) ",,"
+}
+===DONE===
%s(2) ",,"
}
===DONE===
+--UEXPECTF--
+int(1)
+array(2) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(1) "2"
+}
+int(2)
+array(3) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(1) "2"
+ [2]=>
+ unicode(1) "3"
+}
+int(7)
+array(2) {
+ [0]=>
+ unicode(0) ""
+ [1]=>
+ unicode(0) ""
+}
+int(8)
+array(3) {
+ [0]=>
+ unicode(0) ""
+ [1]=>
+ unicode(0) ""
+ [2]=>
+ unicode(0) ""
+}
+object(ArrayIterator)#%d (9) {
+ [0]=>
+ unicode(1) "1"
+ [1]=>
+ unicode(3) "1,2"
+ [2]=>
+ unicode(5) "1,2,3"
+ [3]=>
+ unicode(0) ""
+ [4]=>
+ NULL
+ [5]=>
+ array(0) {
+ }
+ [6]=>
+ unicode(6) "FooBar"
+ [7]=>
+ unicode(1) ","
+ [8]=>
+ unicode(2) ",,"
+}
+===DONE===
unicode(3) "1,2"
array(2) {
[0]=>
- string(0) ""
+ unicode(0) ""
[1]=>
- string(0) ""
+ unicode(0) ""
}
unicode(5) "1,2,3"
array(2) {
[0]=>
- string(0) ""
+ unicode(0) ""
[1]=>
- string(2) ",3"
+ unicode(2) ",3"
}
object(ArrayIterator)#%d (7) {
[1]=>
</sxe>
EOF;
-var_dump(simplexml_load_string($xml, 'SimpleXMLIterator'));
+var_dump(simplexml_load_string((binary)$xml, 'SimpleXMLIterator'));
?>
===DONE===
</sxe>
EOF;
-$sxe = simplexml_load_string($xml, 'SimpleXMLIterator');
+$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator');
foreach(new RecursiveIteratorIterator($sxe, 1) as $name => $data) {
var_dump($name);
</sxe>
EOF;
-$sxe = simplexml_load_string($xml, 'SimpleXMLIterator');
+$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator');
foreach($sxe->getChildren() as $name => $data) {
var_dump($name);
}
}
-$sxe = new SXETest($xml);
+$sxe = new SXETest((binary)$xml);
$rit = new RecursiveIteratorIterator($sxe, RecursiveIteratorIterator::SELF_FIRST);
foreach($rit as $data) {
}
}
-$sxe = new SXETest($xml);
+$sxe = new SXETest((binary)$xml);
var_dump(count($sxe));
var_dump(count($sxe->elem1));