1--TEST--
2Document URI/URL
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\XMLDocument::createFromString('<root><child/></root>');
9var_dump($dom->documentURI);
10var_dump($dom->URL);
11
12try {
13    $dom->URL = NULL;
14    var_dump($dom->documentURI);
15    var_dump($dom->URL);
16} catch (TypeError $e) {
17    echo $e->getMessage(), "\n";
18}
19
20$dom->URL = "";
21var_dump($dom->documentURI);
22var_dump($dom->URL);
23
24$dom->URL = "http://example.com/";
25var_dump($dom->documentURI);
26var_dump($dom->URL);
27
28?>
29--EXPECTF--
30string(%d) "%s"
31string(%d) "%s"
32Cannot assign null to property Dom\Document::$URL of type string
33string(0) ""
34string(0) ""
35string(%d) "%s"
36string(%d) "%s"
37