--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 =<<
bla
EOF;
$sxe = simplexml_load_string($xml);
var_dump($sxe->getNamespaces());
var_dump($sxe->getDocNamespaces());
$xml =<<
EOF;
$sxe = simplexml_load_string($xml);
var_dump($sxe->getNamespaces());
var_dump($sxe->getDocNamespaces());
?>
--EXPECT--
array(1) {
["xhtml"]=>
string(31) "http://www.w3.org/TR/REC-html40"
}
array(3) {
["xhtml"]=>
string(31) "http://www.w3.org/TR/REC-html40"
["html"]=>
string(28) "http://www.w3.org/1999/xhtml"
["foo"]=>
string(6) "foobar"
}
array(2) {
["html"]=>
string(28) "http://www.w3.org/1999/xhtml"
["xhtml"]=>
string(31) "http://www.w3.org/TR/REC-html40"
}
array(4) {
["html"]=>
string(28) "http://www.w3.org/1999/xhtml"
["xhtml"]=>
string(31) "http://www.w3.org/TR/REC-html40"
["foo"]=>
string(6) "foobar"
["baz"]=>
string(9) "foobarbaz"
}
array(1) {
[""]=>
string(28) "http://www.w3.org/1999/xhtml"
}
array(1) {
[""]=>
string(28) "http://www.w3.org/1999/xhtml"
}
array(0) {
}
array(0) {
}