--TEST--
SimpleXML: getting namespaces
--SKIPIF--
--FILE--
bla
bla
EOF;
$sxe = simplexml_load_string($xml);
var_dump($sxe->getNamespaces());
var_dump($sxe->getNamespaces(true));
var_dump($sxe->getDocNamespaces());
var_dump($sxe->getDocNamespaces(true));
$xml =b<<
bla
EOF;
$sxe = simplexml_load_string($xml);
var_dump($sxe->getNamespaces());
var_dump($sxe->getDocNamespaces());
$xml =b<<
EOF;
$sxe = simplexml_load_string($xml);
var_dump($sxe->getNamespaces());
var_dump($sxe->getDocNamespaces());
?>
===DONE===
--EXPECTF--
array(1) {
[u"xhtml"]=>
unicode(31) "http://www.w3.org/TR/REC-html40"
}
array(3) {
[u"xhtml"]=>
unicode(31) "http://www.w3.org/TR/REC-html40"
[u"html"]=>
unicode(28) "http://www.w3.org/1999/xhtml"
[u"foo"]=>
unicode(6) "foobar"
}
array(2) {
[u"html"]=>
unicode(28) "http://www.w3.org/1999/xhtml"
[u"xhtml"]=>
unicode(31) "http://www.w3.org/TR/REC-html40"
}
array(4) {
[u"html"]=>
unicode(28) "http://www.w3.org/1999/xhtml"
[u"xhtml"]=>
unicode(31) "http://www.w3.org/TR/REC-html40"
[u"foo"]=>
unicode(6) "foobar"
[u"baz"]=>
unicode(9) "foobarbaz"
}
array(1) {
[u""]=>
unicode(28) "http://www.w3.org/1999/xhtml"
}
array(1) {
[u""]=>
unicode(28) "http://www.w3.org/1999/xhtml"
}
array(0) {
}
array(0) {
}
===DONE===