xref: /PHP-8.2/ext/dom/tests/bug49463.phpt (revision bd9f4fa6)
1--TEST--
2Bug #49463 (setAttributeNS fails setting default namespace).
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$doc = new DOMDocument('1.0', 'utf-8');
9$root = $doc->createElementNS('http://purl.org/rss/1.0/','rdf:RDF');
10$doc->appendChild($root);
11$root->setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://purl.org/rss/1.0/" );
12
13echo $doc->saveXML()."\n";
14?>
15--EXPECT--
16<?xml version="1.0" encoding="utf-8"?>
17<rdf:RDF xmlns:rdf="http://purl.org/rss/1.0/" xmlns="http://purl.org/rss/1.0/"/>
18