1--TEST--
2DOM-Parsing GH-47 bis (XML null namespaces need to be preserved)
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8// Adapted from https://github.com/web-platform-tests/wpt/blob/master/domparsing/XMLSerializer-serializeToString.html
9
10$dom = Dom\XMLDocument::createFromString('<root xmlns=""><child xmlns=""/></root>');
11echo $dom->saveXml(), "\n";
12
13$dom = Dom\XMLDocument::createFromString('<root xmlns="urn:u1"><child xmlns="urn:u1"/></root>');
14echo $dom->saveXml(), "\n";
15
16?>
17--EXPECT--
18<?xml version="1.0" encoding="UTF-8"?>
19<root xmlns=""><child xmlns=""/></root>
20<?xml version="1.0" encoding="UTF-8"?>
21<root xmlns="urn:u1"><child xmlns="urn:u1"/></root>
22